{"_id":"@atomist/sdm-local","_rev":"734-6c0bee846a328e6f410bbeeb62a6bacd","name":"@atomist/sdm-local","dist-tags":{"branch-master":"1.2.2-master.20191206162119","latest":"1.2.1","branch-atomist-update-next-1535371237623":"1.0.0-atomist-update-next-1535371237623.20180827120043","next":"1.2.2-master.20191206162119","branch-github-actions":"1.0.0-github-actions.20181026233403","branch-nortissej-just-a-comment":"1.1.1-nortissej.just-a-comment.20190821233539","branch-nortissej-debugDocNotFound":"1.1.1-nortissej.debugDocNotFound.20190827221715"},"versions":{"0.1.0-20180801061415":{"name":"@atomist/sdm-local","version":"0.1.0-20180801061415","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.18.1-20180728225753","@atomist/sdm":"0.3.2-goal-lock.20180731103853","@atomist/sdm-core":"0.3.2-20180731014458","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"cd849ceeabb6c96e0ceb5fde12e242fa86c297d1","_id":"@atomist/sdm-local@0.1.0-20180801061415","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-J17A2W/BdeF/fT+kF8INm0KnNoH2iV5dnN7ZBH3E+FIGjZtuwvnrJP1VdsFpcPYQKyOqRrZGE5WO4vYUz1U/8g==","shasum":"fd32f7f1b06954d6321c0262a9c38c66613e9685","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801061415.tgz","fileCount":449,"unpackedSize":1239946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYVBWCRA9TVsSAnZWagAARxkP/RuvrYp/ku+QHgVFbBMX\nffq/yBr/NdRf6FMUz4qZo6kKoxmIggI0XtmtoYORKbRFbCNpW9xUL80R+6AS\nShioVPOvf2f2mDRG5s7Gl9cUgDTqEQ2fqTIUq8tuiPEPhguCVSt9mX/XrQiA\nh/nBMBHsrdz+NYvdD3DWCxerViJ0rinFrjI9kv5hYRaT3Guqw2yf5X5gwrM+\nD5/51l9lgg4U9N/awZIZWHev9vR2kMh1YQ3HsRohdVhWP3hGyvykcINJIuus\nvQEexlfZAVgw3Q4gsoILGJ1NG+Q3jlmVjS8fRcReeW+KIy+ETHcArUNsa+LG\nmM5F/j+sT9JdM8wmpFPOQtFIgoKI+xPeO/ftrGc6or9yKctEC6b0Iadvrzyn\nbtRmUo2eUpnhNlIVC6qPv9ZjPitvd8lV9OpOdpJnQ4UldU0sisrtIB14z6x0\n1LN2gRVWL/9VTVT7UosoisyjUkLdh6SwGd1MFItMyLhMqr7OpuRn/1Y/4g26\nZxZvva9HYBfmv1SFCpyEzo1pwbEzeuvdNsRXs0jsRqXFolnPfzxjTOZKP2Ja\nMuMHjlTB3J6ouVuNo6E42SS1COsfjEDDlcg3ZdrtHy4x5v7UAWP4zEX+6Fnu\niY6a2mq926BVHp8AS8vDzjOO27Pun3vOG1oUvnhEuHQ0keLJ9OSGV0KDORqy\nlYpQ\r\n=eA0q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCscc9SM1HuE/jFoyNPhWEhQn3CLE4wU0N8Tu+pvsz1pgIgKFsW5WRUfoJZQLgP6zPC/UF8AEv7pAtedJVnL/Zxpv4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801061415_1533104213212_0.27476928532448586"},"_hasShrinkwrap":false},"0.1.0-20180801065624":{"name":"@atomist/sdm-local","version":"0.1.0-20180801065624","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.18.1-20180728225753","@atomist/sdm":"0.3.2-goal-lock.20180731103853","@atomist/sdm-core":"0.3.2-20180731014458","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0875fcf4ea3ef591ff181c75a41ddec26f52a2ab","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801065624","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-U1KeiJOhVDesEAPvFBIAfVj4qfBvjSZ/BRJREn3rgHEX0GEGEGYOn6nwmJzwZIw/Tj/GeAWxVRfnwgUZP9yCuA==","shasum":"b0352132ec49620fe06598195b3717f4d939e344","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801065624.tgz","fileCount":449,"unpackedSize":1240588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYVouCRA9TVsSAnZWagAAbYQP/2teNf3xBJ15OWE6Juq1\nyXeWQHsk50QA5aMsCHBOnw9cr+kwGWAimcQ/g2e5tL+UsLSVGl0LqFGcdOOY\nMBJZ6+kw6ernxe0gobqk00RlU0tBEvR9D6vNFNYVN5ZTRsnWpyeC0mUbiDWD\nAywTTRmNPtknPWAR6YpsbafeG0fGQ9+bbR2P7fHDjVAp2s7h7byKYX7su6ZI\nnZmG4SbV5jdv6A/OScVw7Vo8Kaw/rD+N2GkkaTDIQIsNM7eCWbVLaUBKOE4Y\nXuS4B+MSjiESpAGLBLhB/3iLOS0Jj1r8NJD16lGpDX/u5jCihEq8eBhDV7FN\nCLjVAJnz0Jb8JsWOxoVNKkKrg5yAexczNAUXyMHF5UqOc+RvXNFaZ2ZO+iD5\nat74DPH2AR3k0ldw0JWnj1Zy7hlrr8xN64E8oGOxx3U5uK3EnT3zQ9a7CmC1\nZxvgSvImNSl4brr9qHj0Mkr6SQQULvbdunywvby+zye76e/N+ph0GEPfbcTj\n8ioWwitrsZCuRahZdoP72kCY9NECkjVwAS6/kUIz7d19w/Rflz+rq+Uj1g+C\nQ4UwE0bSUQPdrWV8dbwW2DlFE++xu8MAhgHXKwdnPLPeXN6QQ9m57HLPhnAE\n8ik4/+JRan8u4nSv46EEvK+tQIQmOL8+lX3Aytz4v+8NWupGee8QJTRRzF6Q\nok6o\r\n=nWJ7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGvsVgLsEYrlIUt19WIaDdDKZFjBglN0QyATjlUzGXk/AiEAmg1wyWawLxoM1rv3blWNFDFVY7//mtXBGOhMW2ZhSJo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801065624_1533106733453_0.15151167256119025"},"_hasShrinkwrap":false},"0.1.0-20180801070122":{"name":"@atomist/sdm-local","version":"0.1.0-20180801070122","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.18.1-20180728225753","@atomist/sdm":"0.3.2-goal-lock.20180731103853","@atomist/sdm-core":"0.3.2-20180731014458","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"79944e66d225ce058afc2c9367f6ec08721129d1","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801070122","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-iZFGYqUw02n8/mNQbQgKD+BpazTtj5npsvdmYGhYu9ef/3vDELkxcFd2ACF+w6MuA4N8XVXrtm/o8tkPNEH61Q==","shasum":"ad2267f32069194866c11551813f544351e78878","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801070122.tgz","fileCount":449,"unpackedSize":1241568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYVs8CRA9TVsSAnZWagAAMtwP/jDYSCGPrl8rAyC3zR5R\nlhxb3/Jm25RGICoAmFdHh4kKoxTtqypS1R1+gutTMugqYw+1CFvtniX6gLrO\nKPr6JmOTWCSbov5e7WcylptDO9e6rP53Ed4zV4+Z+dfzMgYsl6nE+Gnj+uqN\nHU0Uie6C5OvdRXWhOo75BAlAYwfVtppqmCr6m9A4d6q2MpVBlq8iLnlVDLJT\nb7Bzvzqm7JlBNvZJ6x9WyLZEabHXznsrZBBuJidB2+uRVra1+5IlmYHsdRb9\nGuXozWidboefaVzIiDjd2spKRr0kiqb5XeQmNug3UxQ/Plpu+N256UVJaVgA\nBiin2iQxjIkAg0GZbVySTRBBbHtY/IDme3lJiFZ8kqUyHsOoHVtx+WvZ7L8m\njuQJFjYX5R1jmgojTYlQ7T49M0fwBybYTK8bHtl+nt7z1RfAux539Iqk1TMM\ngNkZRwYuuOgKiraTaKNFadAmrIq9UeeNcg1eqYkkdQL9YlS7Hpl+bo/BQZFh\n9Oeqpmnl7bVyG+ncfX7KrAzYY9wEgU02W9YW49e0HXN5xLfU8ucloYj0tVIw\ni7B3bVqtCl0GtBrlyOc/F2zIMPh4/WGeWW0ANDBUAWwqV7ICxu4qCiUbTcvI\nbKm2wyDlOssuzxQTvR7W82WCmajsYTp95ZfqNqn1xAXhW/UGNoMW6JjB5kw7\nopL4\r\n=s6gC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPHhy+SGhC9wOqUPVZmL+OOyJC+/z3R88AWkRpDuuw+QIgAu2CkyWZJddyaQor/mvOTm2iYenauzfA/XDr6IeFsi8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801070122_1533107003911_0.13693500917354284"},"_hasShrinkwrap":false},"0.1.0-20180801071600":{"name":"@atomist/sdm-local","version":"0.1.0-20180801071600","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.18.1-20180728225753","@atomist/sdm":"0.3.2-goal-lock.20180731103853","@atomist/sdm-core":"0.3.2-20180731014458","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0540dcaef4b72c6c139be9202a063e6ad90f88f6","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801071600","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-JoxD9ah7bpoYQjGSW5iEgY2OSZEJpBIuIH2ej2o/egXN4LBdVG95xSXAYvYrXd5mCTMQ5NAMz+7qz4A5mAQBhA==","shasum":"6af93dc3e6dba1e3c270d4bf240577d7581be897","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801071600.tgz","fileCount":449,"unpackedSize":1241310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYV6zCRA9TVsSAnZWagAA8gMQAJB+aNZoORPLY4lG7aYo\nVB9hO7iD7Gs8zEZ0/FxcRoeR7aJlkOqqnjLMh0dob/eDTNYdetCmeDME9/RC\naK+7BLN5uDIM2seGqGqB7rrev4mL+9s/pTguzA+hhPX+0qyIiTuUpJgQbKm4\nMXs21bVDaaNtOOSL9gcn3dB0xxgPDuh54hSVnMT3/zpDXd3OMZhR923YpYSC\ngTsJ0wj9hJJa3bh3ZTNk68Jtf+T60brSbPRshSEvXbF7OBrgfrJLcQNuSaYx\n/vz/m7sOEumiAcLJOgIxeoYemDH2Wza1KxDjW0NnUo00KLad2YQkYYTupiVh\nNkaBbc6e4yxI+HRxhwl25sKzLerAohgib6ifJe4FXcTSjsiWc/S11m5/W13T\njVj3PUxg6G4pbyk62dxNJWMP2sLJs2t/D4fl1anTIgxlkK/FHY8xXmXQE8RQ\n4Qkm4ureTA5kG37ddX8KN3mLFBLJR8jXv3BTtQ/18AfYZAkCggPlBYwBVOA+\nhIiER0ZoBZ1gMDwtfJ/nsH3im8Mtt188BMpLejbVZFxR3TRqyoFYQj8fEXrP\nQEtXm3+oOD91yFKimDLF8WtJuH8BPB9Rx733svNnYnKmwRfBAcc3WuejRGyy\nDANq4Ixxau2PlCSHh9h1NsK5qNEieyWW0tVYqLwWyd6ARfmWkTWjNxIhPc9N\nRhhN\r\n=97hx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBGjPoSzU6KyAE7G2MxXTqYMbXyja/ONLdxjag/mDgWWAiEAzH2VHB6q4pz5iZ0Dts21uHl8XXtcpAQnW/Hturjybj8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801071600_1533107890779_0.2276239050491582"},"_hasShrinkwrap":false},"0.1.0-20180801074353":{"name":"@atomist/sdm-local","version":"0.1.0-20180801074353","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.18.1-20180728225753","@atomist/sdm":"0.3.2-goal-lock.20180731103853","@atomist/sdm-core":"0.3.2-20180731014458","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0a8f866133252efaa3b1eeb2ddb930c107a6e51b","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801074353","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-I1ZqRkbsOwtTnFaMD2FcY/8rHyVgDCLID14kG00tFaqPBazLv7nd7FvB2Cc6tQDg/y8DM4VlUpztLO34NjgJ3Q==","shasum":"cc3406c133d24e4e2b08e650801f17605c055a69","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801074353.tgz","fileCount":455,"unpackedSize":1248170,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYWU5CRA9TVsSAnZWagAAw4sP/R1ra1NV3K/1X/IGpsYg\nR1ngHniwlVL5dIGxQJxUz1hj4IEnkTmr8Rn9sKNgY3Y+jNAhSE8kaJkRuAKd\nUIZEgCnIChGKMszi+jW0BHUimOBlm8N3CzEMTwXAuiq57C3sbn26CmmJT7Ai\nNNZRAXgmsbBqtIDnkBgkBvZycnkClnwzh9Uhdp06drR0RkB5HCbIVHqsiUMY\nVh68kIazlc9frfhppK1jOkhKDyfxa2pGD0b76HR5eenvJw0hly4gm3ZolnEL\nQoFPsUn1opuJivzCTORXJBWA80kTUdkcs94INh9C0uup459pyELBlPP6ps7B\n2lquC9Qz7ukp+CNtcAjORaTPn1elQLNzZN13GIJHeTlEvt1sa3nhTwUNe9Ww\nmbEk+Ok4yN2Qx5HYMrg+Z8oqFzdqx6gzzdYsMz0YvqQpidB5i1qxk8wFkRpP\n1hbIixFm02+tkiVm/exRgpyxRIaP9Zb5Ja39zfHTb/VdrCvLCRyplsrSADqR\nJntIMds6O5x0q0nv1lD6CJQPBvjH3PPKTCEIFM119x38fjeIRDqklLdSsukx\nUsMgmEE4bWQ13CE5pTGm1d1RUeAkDMqUIQUXtjkYYiVsDWeHYMQa7dMThpVo\n5FCp4MV1W0WMw1YLADxJOHgN69o/HgCszjB7TKjW2N9JqawNS7zCoYhGI6am\nBUyE\r\n=GGK+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEG/4C//mdqz4DVUQ1TNOosbl4dyjhl0ySETCJo4e0tqAiB9A+dyk9xKJxjF0E1XRC21qAAI8oVZYRtEUXbaDnJH4w=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801074353_1533109560637_0.5951373736024335"},"_hasShrinkwrap":false},"0.1.0-20180801075211":{"name":"@atomist/sdm-local","version":"0.1.0-20180801075211","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.18.1-20180728225753","@atomist/sdm":"0.3.2-goal-lock.20180731103853","@atomist/sdm-core":"0.3.2-20180731014458","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"12561918295c6006880e84821e7df85c66bebe98","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801075211","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-PXXEqKY5ARqyy0JRY/y3eR5WVw8wNfSfSTHc0jqNwMIfN8MJ+A8T2yfeLQSzLzIbXu+q2jwnET4IlhMMr9F8Rw==","shasum":"e8265755a15699f774f6006e56283bd0fe5c2f8f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801075211.tgz","fileCount":455,"unpackedSize":1248956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYWdDCRA9TVsSAnZWagAAOXcP/AtC9mMi4IYzNWZaNd3Q\nDaFiO9KdVew7PkzukGhW8LPrnpG+s31gtyCOVJQdlSGGmiW4k1w/ope5GoZv\n594mkA7hBUZD1jRe56ctAHW9+C4KhCNFGt4jM/S72n0N0kTxMKiB4UX8QOfD\ntxq297ZsZ1zw7gLG2rKvc/xKbFFAcntyv3x37vsx/KjLY7qeMu/fCOZwwuXc\nrUM1C/ykZ1lm4s2Yeq6JOHr/Nkja1eUAQ7NCQrAZ+nfIl/PbaBQhXiO69+4l\naKDBF5RdNMxCi2bhNohs2GRYRaAGleeLCyHWZTGB3bxs4e97iUwsMkh3Kve1\n2mDAT6VjK4uyuOsReI0nBv4L/f+UxE+BZF5V8T4hHuDzwWQ+qaeWF3UgwAk5\n+kfcPgpZJmId5f7rmrKY+oyQwXDlpuEC2skveDGMP/LpQu2K5sAahPXtqr4n\nHG7gO/uUmwc56hrZDETVwTWYXv4sZr2rKgprxDA3uKmx6e2E5Sub0jTgNfgH\ntBwGiAXCMFmt8JiydNy00tvfyYiWF+xdntJiqmWvBWy7u/bIqYYSmIG7vMed\nU2pTWwE3J2jPKA47C4j0TdQSLNtO+HB85oCKYVQ4zEHMJH/nqfeabIUaha6o\nqvM0PimO8+KIf6uBlPQ0ujxn2ucDDnBo+G1OvTBN357TAHG9MSdPmrS/RwxT\njCST\r\n=P/ms\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFZuQuNC2AHV2zjLEB33V5EC+g40+0sJsKwTn1DoLPAAIgIBtLJK86LaQZgHeJ5gqHfwdMB6MXCX9GF4r6BtHhkkU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801075211_1533110083135_0.9763457227122507"},"_hasShrinkwrap":false},"0.1.0-20180801101804":{"name":"@atomist/sdm-local","version":"0.1.0-20180801101804","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801093406","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0bb3c157ff6211848d4cff0f94a2b1727f28e420","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801101804","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+mLxFoQobSnl4E9JLvvCgb+26ULJ16n/SmtVTyxjmFWzGqepwum6vUhz1jbpCyLSANuCg4whrQkeCmir4Ue+Eg==","shasum":"a697cdf029c91705ff5ceb550ea7deb3cee1babe","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801101804.tgz","fileCount":455,"unpackedSize":1251595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYYlXCRA9TVsSAnZWagAAP/0QAKTlxXO1flhW0mxuaCZI\nSGcS7JzDtAuDGxDNG+dyIGXfqV/nstoAbYJIF2ImUWHd7gd3j4FzBhfzqun5\naUG0NJ80PQqhYeTyyUgz9Ww0DkwF4tASwbnemOnT4/k608yXoo+IUS4kD1ou\nCtHqCpstmJnsY0NFfkbTbuDKVMDOeF4LchEcIGsPMl/l1XKAaYy9Dvx49/46\nSq55JCoYstUHd9n5n+VC7pbcF+8mpjzjZn5jzv8HvWq4Xr6v5OPzkBHn37ai\nwr8FUudAomI0vMXe9W6EMc7sgNpF4xmxFRj+w1Mbgmhooni5BKbAeH97uZXe\nHura9Z6VnirUXjbq/SwfTWXtEeivTxQLcnP0yEbAbkdy7F1TJopj3bDK5phf\nrwljil0M5KxZ70FVHptYs4kK1R68zwXv8KU57FIGcq756/J0ZTFcM7ufczBD\nuRl5On1cP7h6WigUT4thL/WnvfPsRXOQT4rYjZPD952Bw3RelnvMC3yckuyB\nVEjF7t0xTSJwpu2vROwVe0tsVFxdSwnhnplaylTyKw6A0vlpmkz5uVY88nEx\nrtEwNrPJD85zfOyA0QG/4xx9kdPiW9cM16r2Ne72w6rgRRpHjDXccW9xlXFW\n1Ufn7NCAdfOZQvnylLiDHh3gdbYyfMT2mFlWYAQN3fdlojniAr+5YO8I+HxH\nmqtC\r\n=BjUW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUnZSADmKN1SQLJdft2Q0UavQtZ47qkWkj/C/MbHBM4AiEAmX4LP7zQL9q8pQjKjLHyJv6YK9LkdaLIxVl5ZgiGRP0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801101804_1533118806591_0.8293352573203245"},"_hasShrinkwrap":false},"0.1.0-20180801110510":{"name":"@atomist/sdm-local","version":"0.1.0-20180801110510","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801093406","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"6edcbd7f02287c04aec4c9dcc69db3d64e7af17c","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801110510","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5S1PSgy/9HJzVIa7loNcM49m/z4pWUUAwc7i0LwbN+vxq6l5WmxF8DCTydXldInKzjd0OANviJQItxQTGS0+Rg==","shasum":"2ad7a9f91a3c79dbb72e081bb589a88d9e101ad5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801110510.tgz","fileCount":455,"unpackedSize":1255049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYZRrCRA9TVsSAnZWagAAf2kP/15qEQIJQq6Qk5On/aVt\nmZCpIKXK2IOeoklCLU9bACFNlnycspoBKhYKfcQ7GVi6XtaYfcyfuVwORlri\nNkybycCZNlvS8j6dpuYUc82MQEwpuF/pi/chuKqjmldnOVd6MNgq5aaKN05n\nk5GpPuXipOtkZaP6czhav+wq4egs2G9Bo+zEQL81TIJkHra51BADesB/lXa0\n0aI6Vqus3Cv6UCjsu8gyO7x6YkAr6hcVosep17crv6p2BakcmiagkYrh+jFl\nbUs6pWqBA/27S5Cqpveg36ZOV9XUiPjsVW+U6MwuY5RmKyNMDMDNnPfGrHBw\nNGcWIwJL2ZSekKjXe7rWcBHVtZaikdyZDNwbZK/xOZJe8DxH2AoSX8I4h70K\nBadnp6wAY7M/Zzp2ibNDf0Mn1U4rGX17Y8ghuF9ukMpioHaxPphB8p5BBqyx\nduvvgMatZNpSXlx80OOnxi82Rr1im2YqWeUVjZZjlW/dPO5LadTe1aQ5EBfZ\nAApxW4UvzgS6f749NEQoqEM393WaiTdZIc9IxIfnO14MvBp6v385v7rf4Bus\nhR3CCs7vnGV1oiCG/asRzv9SX0+yD221pCiOEGnKyW4v61vgTooD5GXKZqmM\nudRyaUU3jHrG1DaxmFutfzqOO5GCDGuTC2rp4m81FSF78kg43gASKF8vkEmT\nt1zS\r\n=1WeS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGIgU5U/8jjCyG2RtPJpGaehjSyUg4fAqWxI/OtnokDdAiAFEJjqYEzO/Ho+UNVfd0taSjM+WYzdx5TeQn6QcHwaWw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801110510_1533121643213_0.17632769731731313"},"_hasShrinkwrap":false},"0.1.0-nortissej.shorter-action-urls.20180801201150":{"name":"@atomist/sdm-local","version":"0.1.0-nortissej.shorter-action-urls.20180801201150","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801093406","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"05776df66d13ada6fd71c2bf5996b5a47aeead13","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-nortissej.shorter-action-urls.20180801201150","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ka1T9QmM84MurQAPAQ5AjLRudbsQfyfUuTMM/BmZfbzsxgm0XLtwJyIh7iR2iS2bgFS/fxSzDuPB7XwmfMJS4A==","shasum":"fc3b6b04167ee0863cf7f7f739d74d4f636aa3a0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-nortissej.shorter-action-urls.20180801201150.tgz","fileCount":461,"unpackedSize":1264347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYhSmCRA9TVsSAnZWagAAYe4P/jW2QFRH15PyjseJ0JDZ\n4dR0LI21xKhI+XfFpgsYkmcDX9iAn0AZR+23ZBZ8mFrJMnpE1/32mU8YVOKW\nf1iVMvw+vKmS/7YoiSciT345VcBh29de7rEw2IcaXzu9OlNwvDFnyF26pPP1\nrCAswHGF3Xqbi/MvjfN5rn4Z7M9oC9Jht9K6mixv0ETS+C6kfVTgu8K5BU/1\nm65NcJEBPSfmO+6s6Xp4EWIyR5udqE5aznGtSON0b4oRccdV3Tuj+FCZvQQn\nZKQaMmcNh0ZA7K/kL1Vw9vemoE4b3lx31CGa78h90qZw07DAngi51uKiLyYN\nvFQpnF2vo3RNZnZSo0WAIZ/iv1E3FsFi0xVECx6TNodVpr/zsNGDkDTccmwg\nQ1UV/C0iN8Iq7nV2GMZvgyWkZaFlGxbrBRTs7cPjnHLo5IFIgxthaDaURHz7\nUhBQc/1D5Y6Q9R8l/ZVzKg36zfMy2kI0J/Fg7wT7dzxFO4FmhBP9rHQ+Ryrc\nxxqSB0PsKE2vO5o4TeD6NuNU/qK08M4Bs1ddoqSWN5uUV4ezuSFzSG8Yshur\nXDfdY/3FR7ORV9tf1MugLA2OraR7ourNjAORvh0d7Nw9HQqTM4IGI6NqnbHN\nP8mOLTbrYFBUXvfhZjG2jkFs2EojfdnIGzv6NplB1bwTHsacNiCgbI24T9AM\nGG2n\r\n=mnj4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsHaeGOj4gvYYmbCh6WQtXMQmu0gp59QSnLwhPc3wPOwIhAJjzheW4/oVa+bZ5JOtIKeulPnbwY1JesJ49DLKair0z"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-nortissej.shorter-action-urls.20180801201150_1533154470182_0.17967583417110933"},"_hasShrinkwrap":false},"0.1.0-nortissej.shorter-action-urls.20180801212023":{"name":"@atomist/sdm-local","version":"0.1.0-nortissej.shorter-action-urls.20180801212023","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801093406","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"5850272ed8c4bca7b9d3629b6ecf5a55949b04bf","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-nortissej.shorter-action-urls.20180801212023","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-bQem06zsbci/ft6YnXZGKsNJDJmhuyGNlHs/2C3R+xDi+JsKtBSe7DB8OiK9CYFN673Jhs7BWaUq1T0p1iPJ6A==","shasum":"9a59204ed4ccdcbf208f0b58524b3a3dd5195b92","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-nortissej.shorter-action-urls.20180801212023.tgz","fileCount":461,"unpackedSize":1273169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYiSsCRA9TVsSAnZWagAAqgIQAJtuyqPurAnNzuJ2FPR2\nUEKYpEwBF/K1lHn+jvR3xtI/Hwtg45yJ2s3b2mgiMsM87u84KhI/oYq9i0Ke\nn1yLg7YducKfIJ+q+hTfAZyaB3MFkMGqT/UTCg3caZvOWDUCtpn4JepkU2Qt\n0MgLB93F7TcEg0zDMdg35C41kI8+3rEytmZGz7CEPULNadjsBxKO6obUf/V9\nkKobUQQznn5mVx38s0jwpEXV+oz9slOYY2hrzX372aSqNVvXPPj6FWGwqklx\nuSUQgiQ/oFBmtmtY6g8e55hMwgXZU0IGWXhzRfdOcR9x2RqTs+HRmNhsW89b\nlOKlWKRug67Ps+pwqHPR9HT3lIXc863x5PmFcb2AKQ5lJ5GIYSTdUM4OkrWV\n4/vXJ5xuSWinqloFyJKTfPszYATxHJdX6bNJKpa+wmyjOByd7DpcDZMQSrC1\n5iFzSGF2OP1+9gDzP9XnlQ1wdrSO6y8zxpmwf05BOLXM8wyljC/6vSwZoGyg\nmw5a8kxN0iACayy+9Ti9O4WK4kYF9NPH/2TpstWYTIeso0DXzY63efQv5PPK\nNriDpJu1u1oCQpRbpg+GMxfuEXo5BEGMRpcEhFhJl7gmhlE5CWqPk59qBr9l\ntbFk5ubqKqQIdihnTatR2hyAKN4PzRdwXiGyxwvb9FGH+qKNqK85HEXNsQ9M\n5SXE\r\n=5zfJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIjPA5JD4wJOgvIGAe7Q7EowNO5jna16IcSKQDFHCrOAIgWeMpgVcqzl8GlG15+tuAHggJZibcS19YtmS0KMiWL7k="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-nortissej.shorter-action-urls.20180801212023_1533158571594_0.4043462555322377"},"_hasShrinkwrap":false},"0.1.0-20180801212247":{"name":"@atomist/sdm-local","version":"0.1.0-20180801212247","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801093406","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"3aadbb6fa819787319c94ef7659ac3452b08b06c","readme":"# Slalom: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/slalom/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently Slalom isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/slalom`. Any time you `npm install` again, you'll have to re-link Slalom. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nTODO: we need to install the atomist CLI.\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\nslalom listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\nslalom add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> slalom add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `slalom add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `slalom add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `slalom add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\nslalom import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\nslalom show skills\n```\n\nType in intents as follows:\n\n```\nslalom create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801212247","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-nLMx/0i9KGI1WkMkaKeAWXHYFz+vQgb5gO8ZvtH7SvcvapT/FX2tz8JC3wcSHJpeBOctvddlSlVuuS5Qg+4Zvw==","shasum":"7a9f1073fd531be3476ee16de64f0577a4eb6c21","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801212247.tgz","fileCount":455,"unpackedSize":1255719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYiUqCRA9TVsSAnZWagAAJx4QAITQBur6ucWJwkdiSVeW\nFSn7DoLwFg30dsvhfH8D4HWdh0qfbwcpm/c9WQHXrj3vgoDX3bunoKqlr4ux\nY7blTU3qsObBt7wNsqmyt0MbG2jTV0zFt4ci32yMgL2CMXhlXk3yfYW6/uCJ\nbAGr2jEq3pMFeFMJ6hmZxxAN+awfAP/voa5oXaAH/aKD61/VMUiVkWoQ9HOk\nog8F9ZVqt/OHrqgXsHBONmqV2r8KBMlIJV9pK7fCYC2HEQYPDqgswSs8DOM3\nswdzGn4F56Uo85pg6PiU1VxP6FmsgxcJGEA7K5vPLKv9T9CISEcNYTYCdPFk\nyQDK7T5k5mgMM2yp/uBjuHjRIgugrnwuSxNapgVl5bd7grj3NW1yB7oS4RN6\neQm52oNt6SXGVOyIIFDprmgjQ38f7h0ju2M11fzyuSNkSPdNaQnKy4eN2LtF\n28yvbsWnrVndRj10zqrUpBS2Q+t3q2Vp/OZuPxsAw7590cjLjJZ5HAlqSQ8M\nsWFVMmr06/5NLt0jdjUg0f5hPOuUtAG1QxFz4eP3av3TiPR9KdnB1OCmg9ua\n42+pgsdh9eRvOEHmpALgsGqAuhsI7RguGdYsz/2VwWtg24RrZAyKn2Sk6GEd\nR4dpNJNFJ50JRhyK8k00S7ozkojvi/2T77LE23/k5+nJ9qLjK9l9r/Pj5YRW\nclPk\r\n=n0BV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB8NjUj13varGGHA0C+eWWuVbFd4dfD97khBj+H+6fSsAiEAlQHrqNzPqGQ7RpHtXQZ3I3x8CZKQ4OWzq84pkYqyPxM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801212247_1533158697764_0.7940979444595209"},"_hasShrinkwrap":false},"0.1.0-20180801221828":{"name":"@atomist/sdm-local","version":"0.1.0-20180801221828","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801093406","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"044e92ff38df9be9345d9ea9644859f96340e2bc","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801221828","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-t0tgzL1bxUdbcREdJ9z9CgfZDogPGWP1V7EHHyanH1MkSuiQAeAIV7DqW4uxBjx56vt9CzASfx2DgckPjQF2IA==","shasum":"818e39f6f185243eaa90cb968625bb0435e60eaa","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801221828.tgz","fileCount":461,"unpackedSize":1273847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYjJTCRA9TVsSAnZWagAAwI0QAJh1ntitri9ORvZ9N6uI\ntg1xUGXlFO6gy93m8MDjq93WrBgYI20ZdPoO5UQM+QMRkDWaLjNUEY39a6j8\nBlUax9wSAuCN3q2MLiU5bzxfwwaVWMLCjOh+laeUwoOMJqET3g5zoB1NmdkW\n5DSFfb9Q8HVv6nNNqbHvXHKd5M1uqh3g1VzT7qpQE25KBQGDQY4WZq/6EiTm\nsWtJwtj5W47cj6Y0KAIrMQWhEOD++dePkXd+7Hhr228ZUKNp8k4mna4NtM6R\ngr4VOngW0/SqMeJjrB0U8DyBz9eAtykiDWORpdsltYMQWHoIeQ7/KGImiFiL\nDeAqMOUmjxIwpSN2g/T9LcJR9i75i7wjhqvihG1PLIV7LEzqZl875j+Ga5ku\nTWFDpXvJUZ08pmPJ2oZHhyQjemzbrGMu8HQb7rzXINIpa+5eUzHQjsNMtoi9\n8BbJ15nu19zZzr5nhlQ1KnrTPNK6cPwUXcI0zEe0eiH13qREr54cxmEAIkTY\nmkxWWNwrU08afy8iKHZMW47P3LdPA30jqZssUEQmTuP2NM7O+ZVy1UUlNkED\nqTc4yAZy7ux0inX0KU8RDPAF/D0847gUVFZni0mb+rQi0H1IoeD57RNoiisU\nZO/GoFp5ncGV2epAjKlHiIUTXzL/oViAPk4aCRm42xZQCwvjaJnz1zW5e//v\n+srG\r\n=pEji\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgARl1FNGvqZUsxip07VoZpP/Hi8IrMrQuqXWEkurboQIhANBQzFlie9/nq1o7qHT7+NoBf9w9Vu/gQJaoSS7aMjVa"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801221828_1533162066524_0.3725578253961752"},"_hasShrinkwrap":false},"0.1.0-20180801222616":{"name":"@atomist/sdm-local","version":"0.1.0-20180801222616","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"https://r.atomist.com/530081083","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"4f5740c5361a2d61fdb14f92de4e093947df21ba","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801222616","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-yNWLsx0zZ1Wq/kG8ZAIyeDJx26D9Mo03/M3oH2roCwvXTSbFAb3dn52+xHG6DC77LrcdefPhjKfOH57subAegw==","shasum":"42e86317de47c6d01c27696367b5d09b0196ba30","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801222616.tgz","fileCount":461,"unpackedSize":1272876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYjQiCRA9TVsSAnZWagAANs8P/1fpMb7s8eNH9ZcpH6ll\nkwr23/2TJl8UKoq6Knd2tGpPjSqIlNG33UPBx+HjehZDbH6qCptuI6n3AS41\nkcBXCvBjH5FByV7BnBkrJgz2ig7IhcZs+zKbm0UylKY2sYkHDhOKJav3us2K\n7QAE/sJWNiCVumSkeIsdOn9CB/JxUY6H48qnm3z2OhCoGpfupdKhxW7gvELS\n89D+Udwhx3MhPmaJZfdKCTvuJwhNN/UVuF8bB3D712y3wtfXRxHa2tpFLXQ3\n5XSAg1BQg0kpU0nU/6wPOsL36juuv3Pkyy6DA98PhvVtFlucJLXAg5Z3YgX6\n1ZmWuKMClZOW5rQ6heL2wTA5OUd8NnbS06exE8sOzEahzHWwja+Uu6VZufbe\nZJawRFCXNM/v9M2G2lobHuKAHFmHfKlwGJ7OMhR7SZ4gREO5wOLGrTVZqenN\nctkJvSUfx3gAeTuKveMbo3oNwitwTQDtdevkIz3oxvJUedBIgDvBBH2lDdD7\nPXfC0jYuHvatvbRY8qMQESp8nL+8xXNLqcNDzFAoPGIkrYVbggNR4HE1Ixiy\naz3QT/p6TJ/Zpi4VjnYw0pt4R0WDmLMpbqB+9moh03gQR4/VphdBuYi5ISUj\nqdhV/A3UQk526NJjbouz3wZBHahi/utfKtMfTJe4yZ74oXyzOcCze/WC3+P7\nbaE2\r\n=CtrS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwmKWt3hyBW57cNJtl2oBlmnAYsz6fbFap3/eT4FcjvAiBO9jegp82BgsQ3fkJhx22/BroyLI33Kfo+i55aLxGtyQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801222616_1533162530177_0.05894203738496895"},"_hasShrinkwrap":false},"0.1.0-20180801231809":{"name":"@atomist/sdm-local","version":"0.1.0-20180801231809","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"https://r.atomist.com/530081083","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"2962b1cf1e184f1b85e92e5a699066fc05bb3dc9","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801231809","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-21m7l2i2DEmFYWfhOoyyjsc44sqZZbSZv1WFXC4x4Gtb7uUUqXSAsjOcQKPZEmtbBJXVVXJm14euotMh7EeApA==","shasum":"e62c100376c44bf307479566bd9e9c9c9fb4fd8d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801231809.tgz","fileCount":479,"unpackedSize":1286524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYkAmCRA9TVsSAnZWagAACawP/R8KR46IBy3fYLx1K+r0\nwvNmONI3rKbZdU8vzMxUSyVVMDyE8zUeOZzidkC2mSDbcw/sC2mahTAHCbp3\nzgDVTRjugQUIok0OUk1cCUview1Uo9TMfC4ZpIYKZ70l9PEVcQB/U2q0zz5p\npH4yAz/deR7loJOopfC4KfR8O7ceerZQ14gNKoWQwg/Ht8hglV6l8leG9xJf\nJ04UAYrGKcGNE1fNIc5mzwt4T1s8ZpEO65ez7blksWXKlG7zEDqKYEJ4lGti\nUN38fMsfrA9Nr2c6u7mwT7p1ktHBIu92XqiWi3gdsCCba1DRfe+w2RxwiZ2b\nA8RHfZwZyYkXWXX1luzq6hetRBsn1HMvNwbuQoNpfl0GdVKdbrzrdg0xCBkX\nnEIaJaqg+SGMo4W+h0JL7nynpaaKhSZAuAa6JHv5SPSdKXeMFd214YQDGcCk\nNwCYV7QVAN61yDGV8SZESC9d7C9rnViAXCEHa0WlQTEF5VNFdh+6+KO2ecGG\nNg2rUn9/vMx6pMjxEgD1PwLoG70L8ayMjk8/3ZvIR9mxXxOfFdgwxLI4A54I\ndvo8jf+3EvvYxXkhDANrxe3uJW9VsA7LxWfGd7hkyOCtdIXKX2GIFTGv6E0H\nvesk1AycEO8tEsgYZ5S4BpXNSzo3ITaBx6RC0FXPBYrXKhbit3v2RO2nRzm6\necn+\r\n=+pYr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzlus94zwybM5fJSEJF/ALSkRUp+Ps6Mu4HhUzSXKjEQIgfpj2EeiybXRwT+y8ZNB43koShZQCdr90fuUdVuY0XwE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801231809_1533165604690_0.8974689250958239"},"_hasShrinkwrap":false},"0.1.0-20180801234657":{"name":"@atomist/sdm-local","version":"0.1.0-20180801234657","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"https://r.atomist.com/530081083","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"602466ec588860ed9c4a4b0985fe39c52eda7e21","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801234657","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-b5NX6avQI+fFywS6UueeI4jRlU/dMmQPA/MxlJ0sZt634iHDm0rsLHa0K4MxXhUikLz3oxc7n240sabzx+5VMg==","shasum":"ebc70bf01a87349879baa9287e9b49dcfb9ebb6d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801234657.tgz","fileCount":479,"unpackedSize":1287508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYkboCRA9TVsSAnZWagAAfyIQAIL7V0kJKPE9kEd8EU3z\nsc5reKiiL6M3G6o1KktLO1lwIQUWayEm4CZW7fuqIWu8dYPAzU+teGFLtHk2\nHgxUyGwQzbQ/WUwdYfgcwpBpxSoZijzb5qdIKVRoHezsD6yidvMmCWb/s/zh\nL469utZpk1W20bunqyECQF3PqHv9nnS6e+vB83Wp5bjny2MkcNiL2kVFfyBE\nCTt0rxDsplzdUuuWElaCvXXBsFEWF1X8eZvZUPAoB4sPazPMJBqUkS6b+VGG\nhSYz0mNenXfUh6C/eHCeTYMguc3Uj9E05S4Z8i49gNudvpbEiGtN5WUO0qt0\nHOIdv/+xD4ZIAVnhnRpmrAgfDzV+0s+t3CWrxBMTJ7gvehHKLwitbeF8ERdE\nxunx0uJPkvUhqqanH6vPJPRYesgiS6HkV3BxzBMVntBCdsqib7BPdDElNGlS\nScJZ6W9ElP859laMW9Ol3IQGboIGqEEKGHQJcZl23HGPJNvW9gxhSZnwiMKd\n2u1LGXKUWZGG9DKHoCPOCzIrOs0rc9GuTqc4kk4Z8XUwuZ+Ow37adwdSxNH+\nUV5/9P44odzzpD+gvO7Hv2NQO62eGgn5f40LyUAhSFsneWZe8T1/C2ALy0Iw\n9K/rsrd6HTjPQFjkYVpYXRpcRSrpkcUCCikPpLbGOR5boZWP9IskoZKtxvzw\nmVpA\r\n=KNoX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyclPM6oxNND2raQm5HAPNLrFvj5ONzqRexSAviFtFfgIhAPMpPN4xZ6/gC+UeurvL8PFRs9gsdjMlYWzDLZQsZo7V"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801234657_1533167336403_0.6649065677163619"},"_hasShrinkwrap":false},"0.1.0-20180801235845":{"name":"@atomist/sdm-local","version":"0.1.0-20180801235845","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"ea05a397ef7ca053d170c93ff58371352a29b0cc","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180801235845","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-xZelsmmgzGGrsQiMA4UP/WSKorxtHMYV+u1H9l4mjc+hQf7/EaM72OOWJiZaVR32tI2RBsvgxLaJQFi9BGxE0Q==","shasum":"ca39de5f4ab7099746665dbfcaa19d0e5208e7ea","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180801235845.tgz","fileCount":479,"unpackedSize":1287369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYkmvCRA9TVsSAnZWagAAKXMQAJt+1HapNXyi+OGvj1oz\nXS0r28TY5T2MihOqLqTvxFglLQUZhKmepN5iFL75pgLFN/riIBIm57l11VrL\nweGuMwzeD7nJpliEUyHdcYoFn9ymsLMmfSt8MYFNyKeVwINNbfNeOppZecP/\nQ+zRS4BpF11DSJqIjwxT72SaoL6H6VpjRB8QSChbKcKyic8u6GhoU8xBHJlm\nEAG4Pu2SMe95UsAL50dSkGYfIUWwTt2lLoRnFGrXmob4uEdVwutwp546Ph0W\nJEN9o4vh3ufgaSNalw821nF8C1rikBI1nQIyNcsOO8W5NEir+YbMlNSO2fyx\nOZFz/WosHRyS0+6AYiwkqiw26afXFfOvYPrQtM1wLzn4nBzWjfAh/T004/Zg\ntBznmof6G95wyCdqxTtnZjgBTxiFyL58Nzwg6CSewdurayG2NBCirY/U6Tub\nx0qZBpJ500YtpYzbKKxi/y6dcqQ8GbVqWJtumYmWD2VDe/6UtW2uJJ5VsOQ9\nt49O8KAwLnqya7OioW/2CBabTcUhA44K37zhcU3lbZM4Vtbivb6YN/4JURAt\nV426WIJB48Ab4WlLBm+T8Az9a7C1yXEnC/Lm0CvlRxFZ5lJ4Pj8NBTbZtk+v\nHdajwLfsL2ZvBy3dWU73aIZ2STsBSHCEW791Js18lZrI3MVDuGUaRDtp96Tu\nTlQU\r\n=lynv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWXqFvlrkB3jACA4G/2AWFmR1T+6ke3htxDX7JKTVbowIhANkozaRdpheBaiouvWE6h8XK6OlPc5JCrxEf1+IyLwvf"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180801235845_1533168046757_0.22083570558788224"},"_hasShrinkwrap":false},"0.1.0-20180802014144":{"name":"@atomist/sdm-local","version":"0.1.0-20180802014144","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"63364cea64b550b53fd56950af96b4c76944171f","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180802014144","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-mypREh4lU5PTdXlaY23eADGWJgXuRbqKgZ9afEti/WwQnLkD8eEyzNrOJ0XS5hoCcaudHHjpN82Pb2EFTnltjA==","shasum":"93c476430fe96befe01273b1fcccb64d09296719","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180802014144.tgz","fileCount":479,"unpackedSize":1293923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYmHICRA9TVsSAnZWagAAUQ0P/iHJg3ES75cKLIF8k9Z1\n/lCkbnu2CqZanoXcBK27vGUOCu+BEJU5atgn2AIJ71pzpMrxx+k0nW3QhdBn\n3/NXLCLTdd6DxgqT8AuGuIax3Z35yu4xAff0rbpT4ZbyCK9syF/7rKHuNTaq\nWpAybs+0VvYcYtTh62P94NaFteca0YbGmv3jm3s0VsUieUnYugIHT6TS3viN\nwgA+6rIPJCjNcS/Bip1jEsB6lUFMPhuhy+wCxpnABKBPX3ZwgxAeyRMtRCFB\nkHWAzP5hpLDp9Pa5Sg9JoirMA1ll9555T7laDKYT/tqlvQXopeuwlSV/DwRJ\nM/zjPPWArJszHOmHxI7iwoUkWFrf+Z+7CmSOs1F+cfYGUCCeTGqgT65LL8i2\nIqx+49INoLlkQsOgVe9U+NUdRaKkMd0TnMBAOjQqxO486FIHgHsP5062pR7V\ni2SLFIMSW5baYdg3Xa1Ng7zpZwuzwb1UcsTbcgdS9rpca6Q2BpJnl0rZxrO3\nx8C8fB6dUk1PQO/4NhbRLcVS3wbpJh47sVY5OsRl9nUnQklAJAjm075FDzRg\nwj/pA80pN4pXW+LtkjKgr3cLZ5dyAA2m+ge2Pt+IRrDv2/1hO6tHFNZ7bFSn\nQjBiDe719hDfpp0hzKG/AMpuprspT1pIiAc6tfv+91Bi97hPFzXPE+o/gFA2\nQYyn\r\n=wDFM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfoBcEcqmqV7R57dNiMwPV74vCxQBif7e8LdQ+N028wQIhAMbOdme5B++QhSONoBZnITzYC4sb5QzWa6rWXl8PwXkQ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180802014144_1533174216013_0.9902486561570356"},"_hasShrinkwrap":false},"0.1.0-20180802021713":{"name":"@atomist/sdm-local","version":"0.1.0-20180802021713","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"e37c67e71d42c97eb1f0537fc19a733a61629c6a","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180802021713","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-cTjEfcPNLdzIuXqZIh7MHauHDkeIqMU//QC1k6dR5JhYG889zgeL1Nfhxp8rpbIlzGghSKMS8DrarTMG4wYP7A==","shasum":"7bdc2ed598e7b895e82d78623270815b423e655a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180802021713.tgz","fileCount":479,"unpackedSize":1293599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYmogCRA9TVsSAnZWagAA+M4P/R1BHdT6lZo4ahuiPoM2\nZuqFsiXxsMHJ7lIU/0/HYhzNRrfyt25sDAdYy8xvp1UbCIAKb7vljSnse8TN\neM9bjcu/7e+xPmLCjSGAEXP5Re8Nrks7XcnKsQrqUnzT48amZVHICTPY+v3O\n5cIjLxOeMH8zP0qsWyR4MQgZEJ47gVAu9rVimC6db34eepda0H7/m/PUtzwM\nJK1AovCVWPUvo1CSqpM69ireaQKsKdagJnezknM2Mim6QVbT93DHtqz96f5j\n5iWpqhClzOgekzxLYBiauMEqjP5yS0peha9ex4q2wDfhBKl5HVp+6eTaeVTh\nAPSNY7OCRSyxObNBGzqk9U18WP8NWHFomb9RUGN1j+EoGeh2zKGb2ML9mzFo\nsWVMBeg4NsbfQAsfw3bpFp28zVYT0c86B+yi1RnyIG5W0O/R4zshcKaNXhLE\n8vbGiSpU4Cg3R/4h9SLe60swWosKOXc9/6HRYXzivHsq+OmDOo2IXxqKnPOF\nHvUi8CuEcir2GTX6EXjU27uhxUAaYHHWWX51wQcU/HuaynLsmOs40a5LZIUc\n770lfKdU1gSSMLyuKJkfjOcAHlqD8ox4iqoulvVonkte0Ei5Il1O+X8oAUj4\nXLcjMtBxoYpL0LFB2VmE9dcbqVDYHgLkAdZPwH8EiSgbLGrUaReaLy6NL4eA\nRNZm\r\n=B/8u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCerxrUbu7zNsJIo6k4Tsce0INSVCJEA4d38/gxSys9mgIhAP1lQHEoatmFHeAlfB2unrgoNqTBxWj2D7tXytv0eJDQ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180802021713_1533176351746_0.5905674368889029"},"_hasShrinkwrap":false},"0.1.0-20180802024254":{"name":"@atomist/sdm-local","version":"0.1.0-20180802024254","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"4346fd18f6af1920280cb49c04ebc9c63c4d4216","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180802024254","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-60Cp1FK7T5Rmq70VbyJxymLPB5SHc3RTJeSMpRSoiZL+WraUQimpcd462FcuK+OKRZC1DuQWQGnoAWBzbo/EyA==","shasum":"d268495970cb1b37c1c01fc7cfcddae0bb939977","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180802024254.tgz","fileCount":485,"unpackedSize":1296587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYnArCRA9TVsSAnZWagAAcUkP+wQ2mH98J9cdKKZ36Ufu\nUZ1S27U0fUdrTN2Dbtw6gcqcb5PPMyNliM62/i6bd/WxcuVowRZ/QSM6hBQt\nf27N2ZNJdA9z49JUMLn9OoU83T33SATE6yihTw1614hcnPizJAnfPtS7RVD9\n5AxsBWfDGJns8wTKseOefSU7LyI/OBNHYV/QMYMVpbkhx1xX2eLSjMX5AQ9B\nMEtboX1oLb+q36UffKuy74WVcOZPXd8cq6AFOS97VSwla/wqci5IvVYg2RWk\ngEkSd9xGneEPEzLgtEE184uOgmnTeYMvjsbmkPEuns9zvnhYQDJDwPgPHF+m\nJ+RrB2RmpcjjNNJulEjzpBfxYoVtt4CCp9w/e1P0Z5W50MVPZoqoKIHf8yNL\nX6pd6XQ1TqTt85wxaN+sC5wv6XioxdVIOxXjj7AR8tBr6gM+ED6wZJf22pNB\nrMqb/vEbhJBj8sla5PUzKHYsbczhaoP4a1+8icTvfZVTwmc+/JzJxOeIT1lA\neAkL9+JShYbmiOl+ygO+fns0JznqfhbrXC5QwM40uNZKWFDxQbniN76JZfkX\nQlMPdgfrn5kfSmtiVF1dIpj7O+vyU5jNBs6aZ+2RY3gtJsXby8j4k8bXi/uU\nf3NHqrF2f4BtDaH87P1591VXPBfNe77PhavPIU/GvEOqOHhugtxY1uS20y5S\n3mgc\r\n=pqpv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCApd1cQtBLuflbuINYYAPhkD50W7IDtjOu3LAoNas6fwIhAMqz/whqgD84JMeEIUwLxwm0eRkV4Fpkoj4Sv7bB1E7f"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180802024254_1533177898934_0.6342293793432405"},"_hasShrinkwrap":false},"0.1.0-20180802064619":{"name":"@atomist/sdm-local","version":"0.1.0-20180802064619","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"311e338ddcc531572fbb0411ae7c543240780cfa","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180802064619","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-3F2G/1vIR+g/8cc3pgid0XmL8thQK5yz5kZ3lA800EuAA1iBadERTMyP/cXbqGyPPBXeJYsRB5R1iRky8Lwuqw==","shasum":"d57136fdedfbe8a84b1cb154c571996e2586b606","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180802064619.tgz","fileCount":485,"unpackedSize":1295557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYqlDCRA9TVsSAnZWagAAI4YP/1bxIRdRVIKxQJN8mD8Z\nqGieRERrhB+9WWuKlQxNM848sRnQ+mnimCc/hFBrXXfKjheGj6nemCWHEZJX\n+PhDj3LJLPDmNInAMWcY2KgLgy7b+g6qj8DrMXxYLaB8KVcxKbBPN6Vszrh8\nb67aqX2rH9ySrFekKjlT01NkAd40A3p6V5+mKyAClGoeOwRXH/XdhlwCGO1B\nv3bfdbX3mMSIVewPzrWia/BPJjx0K4WciCW0PXGBTSR5BXqBibdagcv7n+u3\nFhIJKI7i3WT9Stc+4Ix3zpefDvmxLi1pRK0z1hB1GaW627VBYF5pWSpjT6GJ\noZ9v1fXawrKA3YTXrZ5tu/ucghd/GfvfcQfy9YcplbH5gV7s76g5Gra8zQcr\nQRzHNgVrm6jBQJwzilXqSUwyvUYMLzfJmIIAzLlbceG5lj5POkeUM2eox2Gc\nGFsEpJ6R2ho1Ar5SEAF+sDmsnfEnj1wO5g/Yyv9LAAEz2tVYLZ3dxkWX/mEs\nPOj5W8118TNFdOqpvInKPdsHZm6AIwr8gDmxRuWvj2cgrXrkDNHF/A8ZCVVz\n4EklnSJa+ES6rejJalYLVv5QH6/x9G/l5mYmJUDQUrKKg6/G1lUhCRiFLU4E\nHaPpKqWf/ES9BsvqZqvQ6GUPlohfc6GXf5EjlW3acjt0PzhvQx7Uamn1ilGu\n8Djo\r\n=xXoc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE0GiACLgMD9xGnA0M8lzB9j+uYPYBk01kS6CNpx2D4lAiBsys4FqemZe73e+gs98XPsgCS94jOHQNXub0oUWUQ1dQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180802064619_1533192515088_0.5366848895641783"},"_hasShrinkwrap":false},"0.1.0-20180802080109":{"name":"@atomist/sdm-local","version":"0.1.0-20180802080109","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"28a9749cc517b70c79983b07736708184d399473","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180802080109","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-EKGcadOzdyC/P1UiXhBVbyrG5EEel/0bQEIlQUHjlyFNPu03xpsVEkbwDLUCx2ct3qLTez2IlC1n50MFH83Wdw==","shasum":"e1166da02dd7df412d5c36172bfb47da11bd66e0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180802080109.tgz","fileCount":485,"unpackedSize":1295829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYrrPCRA9TVsSAnZWagAAuF8QAKKg9mCPSTER3T5NPiG/\naEuXtdyAtNq060evo839UowGiMI0l/HNO6y5fhukULVfrdCFICFzOQeRuvn4\nD+ArMWCC1pNMhmi0Wkx6PBXBy4jUMi4RVGf5zwoH9isA82m6434uaS+dRUJd\naH6ep5y36tNjl+A4cIyAh/kb09iJ0KHLF3KWm6plLpOvLZr9meUwNNZWLwBN\nUb9EcMXn63QihgDCUkcrrNCxnoJ3kR/jYa/yS4bytFY1RVgAiJY2Ctfrxwg/\nlzP+mJgxfcpyqEL0lpEB/Hsug6M7OQyZscb0dimu4KJLsMUP9YuN8etvyOj2\nMnnuQLIWcR7Zy0RH34FFxauQNxyAtlE29ibc1WgqYpPIcHCQ79uBNrhVhWgt\nV4DaO9JfMgaqL3UiK/UooVpmcPz02PSz+wYqR6IrcYOfvyIsWa3Nw2FonGs8\nveee9Du6YUVYkYO1wJcoeGdYXt/m7gCkoU7MDaOUWubouDKr3kOZ4jNk7xME\nyz0j0Uh3PKiEEPR9Z+jTXHls9WVLSXIWXmhoWI0zspLejPp9OrNQg9m2w17Q\nQJyZbx6VtATDJMhZ6KDD24JNEjYpSht2aHZeEOx+9HAbPOI1r/Jytm/U26dA\ngNrEQceZ2K/zTZ7GvO+S2VTcO/UhY01fmDv7/AsdLcMCABPGw5nTOfJF+zlf\nHUfh\r\n=IHJH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHy+CbXwMOj5qx0Des4FzgsQ7PGICWkY1CH4a2epGAPBAiBOrvGhTPptlmEtC7EfZJ7WWOGmvA9RUdR1JXBmLsRJdg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180802080109_1533197006786_0.06121026592869905"},"_hasShrinkwrap":false},"0.1.0-20180802093856":{"name":"@atomist/sdm-local","version":"0.1.0-20180802093856","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"58d721d6ca38c7c588242add31902c7900579295","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180802093856","_npmVersion":"6.2.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-4TAx1zWol/pBTCJeFMa7A/gHbhjjW0ltfYjufWpsoBD6SSTFuiZcFdPS852xYLX8yCyNA2kKHnojdJrHjyn/Ww==","shasum":"b2555cd48ce9993e16a45560cd2cbdcf79dc2326","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180802093856.tgz","fileCount":485,"unpackedSize":1297461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYtG9CRA9TVsSAnZWagAA9/oP/ineiM3pXJ4aPVDhEh7N\nRYXX0ElnRm7FmnpoUI8VzpaQM5+t6ocRFhir9NzBKy/ojLleGltb0YZzRzig\nEvypE5qDPl0QVn15ANMp1BRsUiYWY/GaHns4ywytS8XBkjZOMjyqnlh1dk1J\nRu0OejdMHwEI2gq/z3eG8taS1xd4UTIbJgjlbcp1zDWdsuK1POEsBPLiCkJc\nImXKS3C3jN0SWI8ESInVfsTE7g8HXqRV2G9hJIS7Hzb4Ld2Da5zL9qewYW5O\nHl9jGUuAWa69IY+ysaYuzdj+FLf0RrKVHkPT6pT40kVPbZAwWl65MzyyNP5K\nJh390Brjh1zsTEr9JA5yW6CHF85P9wAOPvdosdNDRwc9y6LNF2LW8jEeP/mW\nBNZsJXoSI6tOH1xQomqhLY/9XeL6YnWM4OBeia/GX2easBg76YkMNUX3flyW\nT0DOUXMbkaZtRuFVCvtRnSZBzknuf/FnQ+FO/qDiMmthybJsx/j6+onSUmX4\naGruydTsu+ACCbhbe5l7YoDbY0G5x80kQsJl6Dc1jpRKnbpaCIp6fNHY8Ci5\nfd0arJfIVmlmCxzUy+wyy4IcUBY0HUK5pPlQNhxU8nRiw1OFxGk9QBW3n3Ln\nv/1tlZkGbTXsldT4W80du5OmOZHO2TJ8yz5EYQks3StxFEU2ktnPFsWc20Va\nn2fI\r\n=2Dvi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBdqaBswlQskiAs12txU31ygyrZ68CBYP5vYDQwcVq8cAiEAg+eEc0/HnRNlbjAo714y0ZT5katNjVeoG1GPpyERj94="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180802093856_1533202877181_0.7852286779740494"},"_hasShrinkwrap":false},"0.1.0-20180802110407":{"name":"@atomist/sdm-local","version":"0.1.0-20180802110407","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.1-20180801085032","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180801094008","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"13e1b873e8525d336d1076d6f269dd6d17022d91","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180802110407","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8AONsisXzMGOHP6oOZI1neeAzJrR9wCZbhIsGZIGD5wA3ZgqHmPP8QjAc7co53JjDRQ3G3aZD9AdIJVb/05uSw==","shasum":"1a4f329271b755b0de42a058073243a7a1627255","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180802110407.tgz","fileCount":485,"unpackedSize":1297873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYuXVCRA9TVsSAnZWagAASz4P/1QtmP0eRxhPeHc4Aw9S\ns0rvpxZo4RfYbY20SIBSGkFLGBBm9Yd1EtUEtssgG5klABCEEDCqSnBk6mUO\nb4l3oEAOEVkROT64PxO599cq4n4KwwyfFVAkR9cIlbW29QYiIJqb/0AFfSdt\nxrtqsZ2rwDM5B99Tni7TrZdk/soyi3BkJ3zKVey805Hbo3XY/WOpncXruYd4\n32k+dLNV6L0EKXR2hRjp6PdqR1bB5BucP/xrzXJ1UHRIA6TSFnFmZJsUlJWU\n4wugugDlOTE57eEbtLTPk0obmx2OmhU0rUhH+JgEP0XyQPN2U0ahI0GPuWKX\nExHwTIL8NBbERLS4MKHisHIYJkU9plBcYzH02JpWLrVffiRXHZ4un1pHztYW\nUpkoZW0Gs+528Hxse6ui3ILXIt63BaR78C3n0Fsp4BbVmWeD67ou6uB8XDav\ncPnsxPCL1TPyP/+NGBUgT6T1MRL1o0UjKvtbptYaf8lRT/aX5NmzYiFPug7i\n3zC3NOEs3bS1a0H7sL0Nwk1Ueb9an2wruwu+d7yt68ZrxBlvSOpuLYiEnS8g\n7qwTC0KMnyO6VZkfVSONAtNWAmas63uZMFooHc0fa/Wxdw2ydftlrbXHHtjl\n6XoLAjVHEiuulL/pWl5ny2iXmn+VAcOYLInjLCUPOsdp0LloICgGT0dZhUxS\ncuBq\r\n=2HjJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGBQcrzH5/ZkjjHXpWDGROIrgeWHKenxc6AE2rNMERk4AiACVmwcLdw3jdSyppX9S6GMeY0o5t7+BLwUljVmIYo+Ag=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180802110407_1533208021126_0.9824291576413102"},"_hasShrinkwrap":false},"0.1.0-20180802154823":{"name":"@atomist/sdm-local","version":"0.1.0-20180802154823","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180802104408","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"6440e397c64d4d1cf0b7b96c7459f325e836ac8b","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180802154823","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jgfUqeQ3dC6bsLZ/0PXfbzgtUN1a8oJ7vqEoCpLfE1/oytN3z+DhFOC/9C6BEsNVIDJHqCEuYeBpzD+b36Hbwg==","shasum":"4e25b71965671527e14f1047ff6262665ea79950","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180802154823.tgz","fileCount":485,"unpackedSize":1298429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYyhVCRA9TVsSAnZWagAA7NoP/R1Cv3FgxtB23ibZgSNO\n6pdxjnFg3zGuc1Ux0TmYOrc6NgBDhkZAXGMfwjyzMLhGpVBZtpa/PNSW2fbK\njgL3/nr0/iYyJjWzaiFojif+WcRvwIIvvHhCPE7xPIF8Hm/+j87epCLGnpY+\noNYgxSoci0ezQ0DidJLmkzw4bjBmyjddldohBeridoUmbfsfVPkxo0FKyteR\neEAwEWt9hnqM+ZTf/Rb9J10q9shCZkFazKpeF2AFiJHiGiZrXxCHY2JbgaY7\ngn+K3lzQz5BEQ+eUJCTtCf0ca61LGamTO2EOBDuH+w4EA86JKaOSjwDpn91p\nJrqaGthimTErYp016iR6aaL+qD55tLXyl96Cc9uF6X770jvL6re4Dv9cPVyl\nt/tUoCQqM5NKLqLEjK0MaxD2sVruSwJ8o58vDewqZUBGCc1z6Xac6hgIPpmr\nsDt96Mkh6/UE/+eqtaMSWKC8oVVHJLq/uMrcXlEKYfsjZD6hWnQEp+uSaDrd\n3zO8Jd06KoXPwTD2E4/+Z3l0NLTzEnmVfKCZskI8MfQRhWa+c4nOshgntDFq\nWRwQ2hGbC4l6m9wrF761HTT1QGsGXZBlyz4RH0lj1tpvsYSNp6YQghSp/fa4\nEiQa0BY8l6QuQdBdFSTgWSjyxrBYPkdCpTPwMOu71leRIZeQELpxUq8J0Vl3\nxZwF\r\n=BXV/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRHsqiNJ+lEusPsn08ObRv6f/tdst3vOvv0i27gDhR2gIgOwmzTiVGG7/6ydngCjvvVjmIkOhAZMSsk0vovJFoV7w="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180802154823_1533225044201_0.17852100370435697"},"_hasShrinkwrap":false},"0.1.0-nortissej.mp.20180803011011":{"name":"@atomist/sdm-local","version":"0.1.0-nortissej.mp.20180803011011","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-ipc":"^9.1.1","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180802104408","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"30c09ad4eba118c38f9aaf32b840939b04272f2c","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-nortissej.mp.20180803011011","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jQWBRcEM6q+vXpgyL0a4UaAKrRx9GREjMYKHoEfoSpc2+CU+fYn/0LFaalRZSMcJ5huJlBGN3xtCI03A/aiwcQ==","shasum":"c04c5f392c15bf046440b55f17bee1aeac237907","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-nortissej.mp.20180803011011.tgz","fileCount":485,"unpackedSize":1298854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY6v+CRA9TVsSAnZWagAA77EP/0EYUMszCK0heXAV1pXO\n1HCF9/aHsWL1EoGmz9+pflpWZVuwLxGsvWQdDPYR8ZntlN0NbNvUMvaD2Fq8\np1Nwc7NRB9DJKz48SSfZ8L6IkAHat1GX7AArcrEdBaEh0SQp2MiZyVRIrJwS\noVmUHeX1a/SzVTPMPYzDBhqyFoNWbA7l1KbDECrmsqlRD0h5QcBPJScBrFQb\nv76UgdvnPhGTBmJgKUQypAayi1q5A/Yva8YRpeWMWSBnZzZeE+TPX3ifyIy7\nvwL1AGES7P5cIlhUcjOsIBTjkMUqY+VJsZi0+BfULjdUyraAOGLwHOytuqdB\nEVexDEagkHM42WC70xlTdSQg6gDkZ0oy2MHIo5bOy5ZL8rag2wMuSAXhRrdl\nhIicUzfnl+T49q6QQ4B1qBCyQMobH2XD+M8o+eIlKxLHSG49LCuAUGEtcQVc\nKFkLZpDYt03OzQHbLUdeiwAbwIiUtXdErSsrRXvs+EpvqL51NKDIXQZKnzOL\n9LndjmrXPgMMbSE38+ju07Z1WpxgXOBrCAa4Q7D7RDlv64CpP4ELdWRtmwqz\nSUYokw7P96g5cL1uixmnxCwnaHTG3nPMo2fP9CMqQSOcKoxOHoel5DaLKPAx\nMGpNbeWuQMDppYwz0fMLPz86xyHJcyz9jz4HuUHQBdX/yiw/HvsewYwkPCnq\niBv5\r\n=14gq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBl3ov/sJOXmdGP/C7P08Smq3ZjUh2UAaNfkhtM3ZfnnAiEA1srfvUcBvCPuDnoMoLn18aPlZKgzkVM4lzFDLCILEJ0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-nortissej.mp.20180803011011_1533258750034_0.913350748255723"},"_hasShrinkwrap":false},"0.1.0-20180803011136":{"name":"@atomist/sdm-local","version":"0.1.0-20180803011136","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180802104408","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"1a7ded036967bd92ad8736b07e7ea54d001ae2b8","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803011136","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-v1ldsSqT5EDcquAcinsmJ1w8oBL/UgbfWA3faRvMAJbvIPtzwaVvB0A8DxEZYRKUggzNDng/ea7JIrjWgxwjVA==","shasum":"40f8518269d9dd6e95a75ae13338ffbc058ac1ee","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803011136.tgz","fileCount":497,"unpackedSize":1307821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY6xwCRA9TVsSAnZWagAAaGYP/jXwFhTYY7aweSzD2bhN\np7mxPPYfF1UwkEHCLkBRt92caG6SK0l8Gl52njSG0+Vg9A/7QxWX82Vk5PAQ\nEi+zjT7KBeM3yxeEYPSU8SPGjXxnfMLA8zD+qKZJyG7QMxgTHCo4rPnk1vNd\na1d1RbVSx8PYBwL57enhaCt7Ralvu40AzCgGsOFWe6kVv+6BywWujzFfhbDS\nyEvkf4kvr3mtbQDIL/vZcE2aOkwjcPlco8EmETGcLuwHt1wn3MQT2O/pyGRF\nk+I9V/eTUDj+wSxvLS9VldNcG9xzm9lP9eZhj5B37R5G3fQfAb4z+XzYvXYz\np6hhHUwBq2vxUY5OjFINoJD+BV91a0+RxeTsXsUXirjrBaAmkW6fNuh1Yg4g\nJpApM368kt/1smhaFTcnY1Nx0PkhX+JHwNUWGvINumZ5sZaIjEIB2sh6ft6V\nYt3I1F1nRzfWOMtaffIK4ejAkz/U6hxa9venHO5Zul5VtdFasJt0LFMlYFZa\nUIm5drt9nFTHwO+DeSxwRTe1vVx5X6NL9UDfVNmn9I+HLu7Ytdc+pXBSrrpB\nAKWPw2/n8tbDObWWr4veiy82YrAfmxKcq9kCP2l3N3+AtYZaGIfXqI605XEY\nzStRgcnzS+UVMtc2TY2P36fhEVy8W/smzKJM23KfO1TXz8kyz3i1NBzhQfxL\nkV0P\r\n=VKDv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFf4sUbyuVUjQb3n9k6nD5j7nYEFX+lvXt3bJMCfEFG3AiAfeClzijqg67fH75qWcMREsDBif9g6YiIhdKr2DlJlnw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803011136_1533258863640_0.7525547430465445"},"_hasShrinkwrap":false},"0.1.0-20180803011225":{"name":"@atomist/sdm-local","version":"0.1.0-20180803011225","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180802104408","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"632cf483d0086c42aa4c9a439bbc5de929e94055","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803011225","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-qaIx4AyCnCAz8GBxRut5Tk6xZ28NgvU+Y113gA2gOLpTkk4zXYDcwDT26KSLDfU//0VsbfLUPa9vY0zeIVfIQg==","shasum":"e46c1e1a6f918d1db1b3a1e923b09f9c8aa74439","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803011225.tgz","fileCount":497,"unpackedSize":1308233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY6yjCRA9TVsSAnZWagAAT10QAIDg1zhbipU/olmcVbtQ\nCupTZdUDKFWMpniWXpvVPiOrYWHbvknNdruaZsFSQn1BGgWyMxGclKT2J3LB\nCNURahtYWbwPqk9f1/Saf7bZeEzGlcCKkCqaVp46Gxmc/Nyq5M1KvmNj5uEj\no1kqYLSv5miCk14bS5WThkTixcOTtAgeANEoyRwsI6sVdy7mpRex/apAq3KI\neqiiQWxpuAKMJZSMgB0xGftUyMf+wI4DiB9Jfs/tJ2NbRk2UW661BXvOoRZZ\n19qaHD4WmaAkMknTBPfBhagGymvDazd5LRgKxv2itmEyBEjzmrBWip3z/jOF\nWwYB8ApSLpel57EsgsTHG6AZCRfcKwlsgDBww7ArmWk/TJM/h/Ny9qXgzpWP\nhnilHuuQ6zn8kQZvUCnOqVQQdRb7l393E9DQtffTkhLMLsH6ELvBqsNxtT3C\ns2vVJyj+n5HgKghqHumSJDIPUk21tFowz4+QBSjYuEDS7ulsIlh3WUGQmxIk\nmXi5DFv1Tk59mAPvZc9dwsufM7ZONa2K1VNusvSvH0+HeEq/L+syqSTjUiu6\nSqn7DOL4YYJpHgI1Sf66lbZNBMXdbo5LiLPS2A7yxQHKPsM5R7Krean1qnyb\nkRrRJ0023/XZHH+LfWrJaVqvXsMFAEr/KhEkNrXdOsKG/mY+YqdeC3wW7pAO\nQKA/\r\n=X6Hu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgG27JrlgchbCHhjIGWKcGK+KROadaeFo5pyAoXoCf4AIgRdxj2dvoR0gbXklyiDWr0R8imx1+1OUWjVEKWQayw9I="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803011225_1533258914065_0.47287462203163333"},"_hasShrinkwrap":false},"0.1.0-20180803012706":{"name":"@atomist/sdm-local","version":"0.1.0-20180803012706","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180802104408","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"d7dcb5bd58c46f8042f17507459202a0de7007c9","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803012706","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ahFDdLM5s0r+f9gsfh3bexsJn3h25TCRAzAAH4yJCEVgWx/rfZQEMwHaSZw3Y6dhfohy+r3AALZPFgbAxvrR1Q==","shasum":"5863b8006185cd968296b2e8fbe3f6cdd89f2b7b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803012706.tgz","fileCount":497,"unpackedSize":1311651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY7AQCRA9TVsSAnZWagAA5VcQAIiKLcWC1PYeM2ps0Zr+\nrvHIK7V4idGxNlHJvTI5dc41ODYffi//Gtf0+f2+xcvdpz3DA8Cpe2ilifoB\n2pZD63XSyFFTQz0++icG/V+rgbtdkEF4EUVhtrxmYqP4wvMDcy4JqLUjitfc\nfrC5mATUVoJw6HRvQktaxNqs0TnRhpBNPeqWRFW+zz+ZhtLHpybH8TveS1PJ\nmusmBxOGn3Yiv33v78fiu3hx0Oo38PzpJ/BBRik1sE/cj5fEPPDjpGd81XCf\nWuCEEzuYE5e/A1022HrfppwbRfQSv75Y+o38q5SMzu9L8+uEKc15CvswDri0\n1jQPTfpj0dQRFvqIhjrngXDZ0fLIH1H5mSs3+1FY7nfF5+v5BOqbMB0ZfKkJ\nojOthQha2pRMN43/TQ+l8nxyZrQocFzquMou+hiRcz/4cZGvhq5bug9PVXcI\n3Sdn5U+e5fjA2PWCYJng1fSAGyPDw3bHicENrppYfjM7fR/7l01pHjKp8fZE\nQ9znBUE0Q3/ThzxPeC5CYXDrIB8ZUlwH+FBpEX96QKeUU7QnEBuMgQSZgyz5\nrFN0PPdXN95m1Ez0htTX0F7z4LERMX+c2uCJ9bbrymSutkbTiYiy13EZi0ET\nRI1iDQLbBqcWN0aAFiddrpZ18NlDDOb22k84DrzGq2uZnjjExqHOaOWWPGk9\nrrxp\r\n=PIjZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGL8DAO8cPN4o46k6MYFXAST+4bQfM0hu/BuiQqpI0f7AiEAgNd+QNTh8OU/P9jgOZstNOHjOnNbjFM03ID94mgro9I="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803012706_1533259791953_0.7401057098657682"},"_hasShrinkwrap":false},"0.1.0-20180803015459":{"name":"@atomist/sdm-local","version":"0.1.0-20180803015459","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180802104408","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"e32925270009362e1f26d6246a2124dc7a196c4a","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803015459","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6PAn7R8qqb61g/qDwlXSHd5xEpTELxS02k9FSJrtby+zNTgsp1aDz7RfeQenx9l/ZN65CTVoZE3NeHjBNzuPAQ==","shasum":"6347af544ca4ba19aab5e47dad4733689d092321","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803015459.tgz","fileCount":497,"unpackedSize":1313049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY7aGCRA9TVsSAnZWagAAgd8P/274Zsy8dIl5DYM6My/y\nfww7co4FEKDjZOCKuZp2OURllb227OQZIBLa3gHJrz6mbJ9aWr7FEcSA13uF\nkLvQvrj88ciBc8VSb8yV4gmlEjDobU8Vzg8nUHSa1wfQcz1bitTcIeNUssaL\nUaAg4IrD7kQtS/XfRXbd4B808LZnAsXUv2neoDGY/bQHig0a0/60hTXTrY9h\noXCGv4KW8M8cjSyCTPY2T4LiAmQqFSzQUbUH64D+sKILewGAMzQRxknBm0l3\nqYL/AWV+J+mMgQoemxSWVsHk0tPxZjn/aOB7xHntXntjk6AJeKr2gb/PwsBO\nr3ZzJNJ83vc4Rp2g9wTPk6jmVQeyrAWsukztziO+70amVhtQkTa9FP3fmqVf\nYim1kqpBU3jtFCIwrC6FA0+trCre+zuUZR6szqmt2cC9pkO3/FXlnYnn1AIm\nENqMUJ/K70zxop/5E5wp/k8r8y9jaegR61EQDcFlrOfVeCNR7ze+xqesIobv\nyIbYyFWp9fHeYk69B3JeZR5sDGa0GhiTUKuCZorTl1SbSEsmWHtp3NCiw84x\nIy559MZzeAUneF20hBlm9pNGpNiOFYqzH4tB4iLJPI+o2zTbjB5hgTvxzXB0\n5B8dCQxPyYu2eYKOMrtTxGmd2AsnBi7weOHJkNEdB8zsbHy9aj8Iw7CWtDCP\nfkaR\r\n=Q9a5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHAEist4cjl0+MegqZrGrATZRNzydQ5KBJvELZIREd/fAiB+ZKqivAsgpqBxzdXYqSO2yU7YTZUV69emEn5VktVRYQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803015459_1533261445849_0.733663295102932"},"_hasShrinkwrap":false},"0.1.0-20180803030219":{"name":"@atomist/sdm-local","version":"0.1.0-20180803030219","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"8be3b5060b56e379bb18228e28d20f2ac88896be","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803030219","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-TTLuq6/xtAFQH9cY3M4MvgRnIa20QVebHpyJaydo9kQOnlAzMju7hVPrUsMW0lXu16+cmBZw/fmONxRgJkEr5Q==","shasum":"ca0be161ec673aa87ed7da91001f73af33686b38","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803030219.tgz","fileCount":491,"unpackedSize":1312553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY8ZgCRA9TVsSAnZWagAAdv0P/15ODaVj+kWE52UhIwxa\n4rsTNX9JcPK1yywQsnOOnqzPblNPmKWEiHoGC2nROv3qZJJGXBTiap3J15eC\nh9N8lFTJhASTsG/gwmgYJ/kfNaWW3ioZfQjnS2ZI5yuj93O0omQhRJ3PppCC\nRDhgFURalqDnwVHjnw4VB9bMQOi2RpA0c2CQMwd1RHu2ak/MbelWdmSykuvm\nxiY0My2KmJS8H4aHH4fu4/HkGD+SsoHmCZdlzlA4Pty5F242nuvfjL+PFKKO\nz8mUMNS6/R4zA6aNO48mx3jjfW5mi9PGtDqPLQD1CS2DjE7/IC996v4qoedS\nDzLw/c8EH0kBr2ffajLNoHi34tyIeG+5/gcyd3aNiE3bzfUwYsOcEeWGBcg3\nvyGoKzKkjMRviSrqdVsNZxqy7NaFFcvUgEexGNRSZ5rKWfuveq+aFaNfaQQC\nEFHOouuGI6J3lQxhzMltHaDbioqhRmcc2elyIfPuLWO9YbPMy6/CIJmDn4jO\nvaBqRholZxinG5BszrcTJPLx+HNIGbzv/CaCHDOTCtVhsufhh6mE2U1954MP\ngsmU4ETqJqqzxlDxb0U+uDkHndEwuyscgHuKb5FH8fV4Ya0f50rL0QL9v4Sr\nY/v3ZlRvsyjxoBfBF3IKlSMEg/ikhFYCphRiSWE6PufCsUkpCsCfd3lRvqjJ\nHibc\r\n=KSHc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRBe9IL0wXRjRDgmHf4jczoAX79bynFhCugZa5rNYbuwIhALn5g8CT4bnpOh8rrZOVkv2WI2kZDW0oSvnFkUc73aNb"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803030219_1533265503656_0.21291517088218193"},"_hasShrinkwrap":false},"0.1.0-20180803031620":{"name":"@atomist/sdm-local","version":"0.1.0-20180803031620","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"fb2e86be98696b4ad58207151851e4b8691e35d3","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803031620","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-TNeV/NX1eVqGnO1NIgTfJjdLyHc3UFJROOhHsKPQARQFSAQpQz9qL8GQYAMII96LMfu57iWye1x309tf62ft7g==","shasum":"dc0b6d16eded91f40a5344e50bbc2660c8cee54e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803031620.tgz","fileCount":491,"unpackedSize":1313965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY8mtCRA9TVsSAnZWagAArawP/0PMYhoQE7wNeJM12MB8\nE+PJLvbg6kqAXj1SEyoNqEmGp0vTgzJsZIODAszLOPsRodDZDIf/U6YWZ5Ln\nooEmTuUQfsJRw0VULgYPjG2rVH/opiDRE+ol1jYlhX7DjmMHeaV8Y3WROSWG\nWgTAv+4BQ/V2ZTC1zoEj8ZAM4ZXNXlZ5bmdq4tGMUobmd+0cormUQbYxq4/6\ngzH6W0MnxAII7E7bWYo8tc63L8V217vEZ3veBfdaczfxVfHbCAonlCzobmFl\nu+44XQoArrEBNX8hXMVwB+qvRvhmzY8a6G/nCRbpgkz9KrQocvwJ37djJZlT\nvEILeFxLfKbooiXxAmE2RlUZwI3UXt+G63np4wEBs0u66F6/MsWd3PIOl2WX\n6mCShSfpS37xyl9Lep2IWqLXJDFaEUw+UFUdn27LxA4fdZQL+xVKq/RI+mnM\npx2qGFKc+c/LbF+RCRef9noF6nuFCFEwh2m5oA8h0x4YDdMevPLjaEsOjxqk\nEq8TvKEyl6PrXudPwwUwglVoqvsB9PYfshsxYGmsFsQnL8H8m/LhCc3iQMhV\nExodOc36sMpH3Ad1OB9C6uK7lzCpkjuciNg7tr/z8sDKfzZChRywp0i8KFOu\nY9pbK31od35Cn3zYKl0/uxajIvsTFQYnNHOO7XUF+gUTcb3voLyDaraUWwgo\nIYES\r\n=PZyy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDuOtyrYcjzwcemzAegw4KPI+W4pHj5uvK51KKL3j9wZAiAvba4aYxhKXf/0+lh18b6qcIzly0aNIly+svfktydaXg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803031620_1533266349430_0.7278904158278627"},"_hasShrinkwrap":false},"0.1.0-20180803033708":{"name":"@atomist/sdm-local","version":"0.1.0-20180803033708","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"eb620ea8807190a373c2bf0d2a794cf9eb37fc6b","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803033708","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-mtt7JBhHOWj2F+VW5Ax36L9ORzc8e00iUTCLL65Et1UPMXdSNd17HnCjcS2f5SKsQhmxin4SUoQSwF48f0K/ng==","shasum":"f048db2f88bf2f0ecd96920240765c20092709fa","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803033708.tgz","fileCount":491,"unpackedSize":1314101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY86KCRA9TVsSAnZWagAAVe4QAIJ/IoqJW6m38OAFWXKo\nMrA/wPWcfle0D18TpXpVLBJgQTmu4xCrg+8AzmMLo148Zd+p0VN9VVHTtSmt\n5gwTtH8P274zsyHSppkuL0phup2cASNB1JGJR55gz0TUtjn/TSe/gICQo/WE\n1QBdPikPLwNnDg824wvWZKEt4EXfDawq6nzwiVDUcgvLNp+EuRBw5EOeAXMU\npQ/aq4DcnkyygOORNwn59jD99njxYsqdVuoAPxoloM9l0Tlp/oyyBz6lujYi\n9/aFFR0ZIDuOLwMf6pQ520Q2GkvzXoMrN20DhlN+cnlhWEyzsMv3E4AKaDOX\nlkH0JE/z/GHUO8D2H94lkdz8fLb0ANTq/iZTQ2CIWH18cVCOlB5b86Nz+hUC\nvTY4OMHpB4SMsnvZO3+2TCjpxdw31PF2uFyPEIadVP5kVw+xTPGD346m4+zi\npPunyLjUyl1hr7W5FcxvTeyxsbTNUbKQM1B0VAb7DAqzDFtm87LpqFr/ePZr\nuOHOCioBnC6tIwn043UV3/mcCZul1ZJboFxlaucfp5QrcHOdDeavjXV8rnfO\nGG8EWIaMdUy9dB+BH1BqbU2KAIRnBjz0f8g7+rDygRsZLkj5e/XeV4Qz4Cif\n9NhEvB0aS8aeFJaFzk+hldNncz9sgmrf7FNuNlWB0CYt4SjHnOS6iGIPLKiB\nSbdm\r\n=1ju7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcowDilfTzq8+gNCLEXdG7rlKSQoQSDJOzKakRFznw7gIhALSPxKmf/eQ+QCYWRurDeEBpyzQjYwQlrSGYi8ZAA/R4"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803033708_1533267593922_0.426311387130329"},"_hasShrinkwrap":false},"0.1.0-20180803040608":{"name":"@atomist/sdm-local","version":"0.1.0-20180803040608","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"d1bb7f45703148c3df85cedaa4b2c06c89a0927a","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803040608","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-YZOMB1IFRyXbThDAdZLz3mRGMRa0Ix/N/DLiZ4jCW+GDc3xSMGAMiI/pB03WC4OQ90+5VER6DMncD45wbBMHug==","shasum":"689a78c1a80776f817fd76dc83c21bfb07185a5f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803040608.tgz","fileCount":497,"unpackedSize":1319323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY9VaCRA9TVsSAnZWagAAhG8QAIA5MlSNdsvhD2236oSt\nFWYJtTTqWJSiF+oRxMlAZiaGJnslojVaFz7kjMEfpPBtrgIURoY+KP0kdcv6\nygHY5a2oBN63XB/4M/b2V1NPNxgAfdSrMi0yFWcO/HcAh6FX+o5gg5sVmFwn\n9qKKKideatoMDr+FBZulsCMUBhe9aTdDfU6i/LY38RZbqPPKYFM9VHwTW++x\nu53SiCr/vmOo3yN8l0wsMs2fY3vLOjwWue9lFKDkGN87E8vePrXbf50Px3tA\nDLm8i3b3Jl9qu7UVi1qAAFrWFdDIV86z4oiHZS2CahSYA/k27yxip32pTogq\nfdCNwvcZzMjTbO/vlIdDUXRVBG5K+4cQQRcAsDyUeFDqdDPlbNJ43APk/Lm/\ng9Y0fpBY+aW64+fb9rn55hFo8oFTRu+jwtiMhiDxlLTRjDRp7iE79r1jyayQ\nrLUFG5COxYkzbJJxgp69ve4YizphxWn+mhd+izzLXl5HICtl85yH69rfPJrn\nnxMocG0ysGPFwCpfIMiaTb0wtK+rZhZZuiPhgdr1KyI8YV1gpCp5kWqrj3H2\nCIT7rJEkl0XNp+Gzz9Hm9HA3+JlX6oY62SbcrjVuT8ZLtNvaBd7Cb7A6Zlj/\nPrpA/S2rOfcEl6N0IoMqz0DIlY8g8+E96VX7nBZh78n6tm9Lypm4ES3LDAwQ\neYO0\r\n=vfl1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAKNpcLwL2gAUc1LbflA70OtK7BmxlLPtUsGrZ0E3ZJ+AiEAwaYStoLknN5Vv087pjRU3gC8QEjXgxpK6ZmsKvoZp54="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803040608_1533269338055_0.484882589469799"},"_hasShrinkwrap":false},"0.1.0-20180803061636":{"name":"@atomist/sdm-local","version":"0.1.0-20180803061636","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"79bbfbc82ee7f19f22f72368f718044b7aeda5cd","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803061636","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ogDVZg+B14Ebab+IHgDQWhu2ol8nieOes7WmP+Q5FLZPb46mWEWd/XEofoqFGJWs8vHuiTs+umBngWRQZcJHWg==","shasum":"c2c2322dd4258c10c8044515948b5169cb887ed1","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803061636.tgz","fileCount":497,"unpackedSize":1323207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY/PwCRA9TVsSAnZWagAA+oAP/3UXtn0HvaT0BGasSV+g\n16/yZoV1lICylrl29oLted6IG9bHz/c23tq4K8U3Wt6pxPd4WZBrs4DqfMr3\n0FzF2RUy8L7R/Me14yHwDUgAQzpM2w7u6jAbd4tK95qcs7BrvmwEiStk2nI8\n+LSEqWoyUisfKTuK4kaQe9S1kpPULn5/jvuQoGYNxhcLjXaFQFhpfD/6J5SY\ngdA9X+QVQeWtbq0fAqXr7gyr5JGf0EVOqaHqzSABjy6N++3obAJfTPUua4tf\nHd/tTYUVWs3nE8HOzzypbPrfaEqXjWwLvQyQbZLP+u1M1vF3rrUJMnvI+FhT\nAoP/xgwwu+/KLFzfQL4oeUIxAFX7CSn2ui0ZNcgsQdalQ4bjiOILDPbzE+DP\njyNv2OaazALDhVru48XvblJmgu//n+ZS0YhbJ5JQFTmqaFUIoTwGhGNTAIl/\nS/MJ2UB7z5Q8Qbvvdnv7TApRj5tdgbVWEqRl69Iw8EWhrk6kfvBkmAF1fceN\n38jJezw4mERY9hDVPHL/U/Q++k4UrrI90xObdnIjLPUYKXgafFoC7+NSPYSj\nDbg0ZbjUNSWwRPIgSTKLXkiLTN1iSU3HNL8p+xfik6md3YmrKVPHndWLc6ld\nXw0a/vK/PdXfsVtuVo8CIyozaJfK+7VeKpHVxDEJaQjWyHuqxmfu2afWqWO7\nHUsI\r\n=xD0q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMJTs+enmbaVFbI8u6sufkbcXY7RbmWWV6FATsm+yLOwIhAOugx3tz1aSL0PrW0TxV6DiEmbMCQRRX5nivaywFxskn"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803061636_1533277167196_0.49694404685208804"},"_hasShrinkwrap":false},"0.1.0-20180803063425":{"name":"@atomist/sdm-local","version":"0.1.0-20180803063425","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"ae08b60f426a4c2cf3e9fd7b45e27dc0996ac5d9","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803063425","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-HA+ddzQys/ijQmONMuYg0gmlfl7s76ttoK4lYYaTsL7/l0QximqKTnRj6jOtPIbDNpt4Vmfjyywxt3x2M5a08A==","shasum":"03512185126ebda8694dbcc2633a222956bf9bfa","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803063425.tgz","fileCount":497,"unpackedSize":1323831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY/ggCRA9TVsSAnZWagAAcFEP/jRJ6E1BMtbJw8XrJrvM\nEeL3nb3vbWzFJ5G8niACgxqqf5CvwKZeQWLJnIbQiXcsORy/B7a0RgQV5ra8\nHKj5y2MxMAkwnrqQs2MXWnbXLWkcnWBN5crGRFrGwynNUKuQ706hlnjdO3E+\nrwX9NziJaqDpt4BCbcwJk9RnN+CeuMZjBjjU3VMMa1R9A3DxKpAxnz1EgwQd\nJRIISdtKSXsuVaUOmpJrdO+w1jMkmjdcktPEVsk8qb3gTdtSxFnzkFLZFp7x\nnvxb4esiD7DfFuWpzlHnQJXQ2BGopRdKi2qs0Ol1VIoSx6JUd/E8xCZ1Ws1s\nGw+9eBQs7h+ACS06C056iK2MHLAIi09Mi3rehbM2Ar6qkyv4FAsVTzgcpivQ\n07TA1vDObqZNUVZ1IADwBLR4SX72UuUCg7fQ80x+omN4zKAOMn8vFbVRnpMu\ntkqdlDvtUIpsqgxyUwn1uapL62B1xarhzV2TUnAkLEPdvQT9bstpeqwqZGCg\nWcBYCGt5cV3roaggQtb//qx2er3TqVRdZ1Xo7hLS0ff5TyhlfvheyIN+STLv\nKU4IADdxM9Y2NcHdMJG6bQ1DDpSQ3Stlk25sifT4F7HwRsw9WhyTZ+I76ICj\n7goNR7MJ67diAXAaPVDzmZKyrDjDgQK4LGn6+LmJc+CeWz1thLV/YVqdbRz/\nZkXl\r\n=buD6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBRD4GztFjAxFM29ko/9bktjiHAadD9AdiKLdayQv9fsAiAp4xnrDNfPlKhSbVqSr9CMxPTnb9i3ivHtEFtyFNO1Qg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803063425_1533278240247_0.5684100641731531"},"_hasShrinkwrap":false},"0.1.0-20180803064107":{"name":"@atomist/sdm-local","version":"0.1.0-20180803064107","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"4ac4e7788f4f30c115cc5991470117ba65cb112a","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803064107","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-O/oEqASUVhi12404OS+0WTn72MsivZWkYDUULjGxRcbRavt4VANiqtAXCGpFzklKpMkGdUIEMR9YukWC3sk8aw==","shasum":"545c78638f1f4ec06cc5ff59cd1b5e958d913d1f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803064107.tgz","fileCount":497,"unpackedSize":1324457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbY/l2CRA9TVsSAnZWagAAZq0P/2pWWSoWp8beFzkriHtQ\naFJ5VyXGz96C9jqzzjzAtKY/1n6zTcr5ltmTpZsTv+GSd3+Sbw5XWqMOe1jg\n84IMIfFQeYMFWcCXNAobGlciynbQwrX9hc80+mA5wLxoD7WYkPTjK/04rCSz\n+E0xZmee0n4Jx91cqOtYCQBlsYxqZilX//5XW7OfJ/Xa0IT4khS8PsAeyd2D\nF4VVRG/9Ngam9k4CF8chrBTaeCAlESLWIwbzFYgAFGB0Dz8y3u/KKiXeWoyw\nIwSVjJe8cwfd6V2ysMHEwKNoCirMtxdFWx4PvVkxHeUi/C6ftiqPXXcnE00y\nMboYbbKRsHm15qW8bppoPkhds+P+E6+wQwYmSc9sd/8hSnPrPkHnMyJnB7Wo\nwK6YZ0NrLyGn3vYoce8hdwK8NTsDP5H9//s4rfKTD2E8vCypkQG3Y4BrQ0e6\nI+dCqaMfSJmiRWd/C//VkNNLebBBFuMOwpYuIB3bKQeAZpNT3p8OhKByAUpz\nA8yDqTZR8ob7PgSsQbFMrNYvpRChChKtFcOUJ3GH+2i/yOiGoIMH/yQo9Tu+\nTMk0bSKjrZkGOyG1HuRt8FCKegblMkBM1nQGZ8coc7MGpn3dec90u+EDIEI4\nkFTsJWjZZJH4y6m4voWiLLab4AJg6Bl5v5g3v8Wc9Lh77yVi4aDkX1jh2rg9\nrUdI\r\n=3AOm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDA1JWLaY4Ac2czR2ylzj1AnbrmMhCsgVb5S9dC8LQ/nAiEAx4g0i9lA+hNElwLRHmz0NmBfJRNGtuk1iPVIts5dyRY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803064107_1533278581990_0.10925159619763236"},"_hasShrinkwrap":false},"0.1.0-20180803081940":{"name":"@atomist/sdm-local","version":"0.1.0-20180803081940","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"6b767c0905fa67a315939acd9c7530905a0e017d","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803081940","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6vAuYIpJOdo2QLx79ud9ZXXPOFuD0Ig7yot2kHWpXTaFteXpD8fz5nZt59jx/6Dmer5KLTpe4K54v8aBmk/SxA==","shasum":"0f851f2cd4c673d1da18f72602e94cab2aac5813","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803081940.tgz","fileCount":497,"unpackedSize":1324727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZBCVCRA9TVsSAnZWagAACGYP/1ldFvM1JazVYvOniSvw\ncUX9agtDeIadZU3609VQBAT87nAUn62lJ9FFbF1OGhYHS4L09nquvLobwl8X\ndJNcd+kWqBGrHXVC0tcfcfj90OiFr+tet7JYcKm9Propj0smVJvkw2GZCCiB\np6rnMM9GEM25bqGZ6TY4hFuUNrTb3ImSCYRccNhF3T5IeUytprRukggM5dwU\nZZ9UxP/vmcjnMDSF/f7YWCQB54mOh/umvJPLjndSU5XyAvZ650XF3K0mqG8J\n3rNI1NHrFb3KsM3lzHare0ZOtVGPsJPa4hs8fWxBKAuR11FSW09BSyHdrptp\nJ4gs9y6YzTrgFabAG31T3GkI6Bu1lv0R07SLsErtZegQrwqb4qCEf0bJfAFU\nZjWs6lUGgq7frbcX7c9gy/nlmtQ09JavSUZpuTmPLYwUk9klDeeHWYCyJlwO\nP+8ILkeDn8Af1p11rhbMKfdyyPnRn1d+BXL2/MVewKvJRALABLBEyeS8o8bK\nl1wAmJOAfqBwBYhIYQhQcTLtdDbeY7GJS9/wmcjTk+cHtN6xLeDQfMjUNaCV\nYzBTB6H/xbNMi3a/Nvg0mEFTO2NTPWe18F+wnm/90yhVdMgYSv0XPaRsv08V\nu6T1yQMdqz88Og28mDL32YTVW/U7NhislegzlIzGvksIBOAB93dQwI9Sp+CS\nGWcj\r\n=rV1n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxiyKSUWuccZGUyIhFNceGfsgkVH9XvCJhl0vE/stzyAIgbhFeYj4xnIsiliZN2F+hwjXz3iZKEJqnyv3T1v1W5Qs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803081940_1533284500756_0.9771708556804324"},"_hasShrinkwrap":false},"0.1.0-20180803221344":{"name":"@atomist/sdm-local","version":"0.1.0-20180803221344","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"42cd1477657925cd253f76f73154d409d229b01c","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803221344","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-e1i1Vc2/LrjYzdNl2TELtv8ShUFdm1iBy7i6XzmfcVmIuHIB7sIiPcfU9E24fEbLp1Chv0u4sTMtZDtsGe5J/A==","shasum":"ef7c66b1d3f185978d84111fc0e523027015f8a9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803221344.tgz","fileCount":497,"unpackedSize":1324557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZNQWCRA9TVsSAnZWagAAluMP/3C4rEXGf/IBF66pz/h8\nKf/z6Jvt4SYPcDp/Wo8h2sGI7vo8feId4XS8cN8Pe6S7IHTQ94QivejMFouS\n9TpvQDZoXk2deh6aLYaZ6ThAkQomy3kpaoxIlq2aoWthI0LAR7elGpBIO7ZS\ndX7Ejivv54YY7bB5bT4iiD6S7Md0652zPZYIkMyNdiphaw8+2NaaylfhHQ8f\nnQXls4SvXTK0kbiY/Q47NR4qqt8VqgKaPdyaMMsQddRpkeWxSlzmXEYiLYIL\n3slOqObrQlgnJlDiAL0a1q2LZn94b5qgzSJsLh1twb0xSuhwwcWn0VQHVzFP\nCGBV9EtZXVyRlzNUTw5xCS6rlE7MZ9Ytpkez4zgGGQf3gPMfzErBzOgtv1FZ\nVQ1oQYOzcFDVru+f3HjtyDEFYj/nnsSK+G6ihE6ydC6gbW1cq8E7fknZHHo3\nDE/q0dNv++wkUYfPO4hY3ADr+kCuxA5mvx3DhxAaqUoimkYUNDJtb/8EKGap\nguqWrDRqMOOt5FO/aaDAhshtEJMtDp9POcJfZvgHUSAgvEuA71/bF0V3FGVx\ne22j7WL8oGeGnabdayqHRtbc/2hCxNyI4rWjjuPsHlaIidiGijmuSYhUqA2q\nc68ZBNAE65mbXW6ZSrL9A9mNJUhXZIdnxzEQC+nZE9n3rd0kQhl5kb7kq46t\nSxJS\r\n=yB1h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDknxeAw/j4Oh/zxtH/g0PyKob9X+9bhALrWzueJyhBnwIgIhHG0IwNDqw4p7kTFy3poeYSnCClqxTXzY2goLzVNmU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803221344_1533334549972_0.8173331243871083"},"_hasShrinkwrap":false},"0.1.0-nortissej.more-error-handling.20180803224712":{"name":"@atomist/sdm-local","version":"0.1.0-nortissej.more-error-handling.20180803224712","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/3727598692","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"28f0fdd1bdd00cd0ca9bb72d99cf957b589bb263","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-nortissej.more-error-handling.20180803224712","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jdxrchUY/60x3F3Yuh2GLdPKPj9R/dOcZ+NgBhO//Tm6kFi2hWlO8hyaAGqqMx39MfizCe20MseGgx59E5kqJg==","shasum":"3b4c9d003320ca8f8d62bc87a587bba468561517","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-nortissej.more-error-handling.20180803224712.tgz","fileCount":497,"unpackedSize":1325459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZNvtCRA9TVsSAnZWagAA8SAP/07meFXQ8BMNjACeY7Bx\nGTblYD6iOPcuJpxQpD2NHREyV3A10HIgdG7CSGpawJbNJBzwteaJ6qZh3OgT\nW0ttKGjc9pt8NjL7gna6Jl47JnqlC2SyQIG6QqVXI4eGuDuRh7htutDXY6+u\nfGs15QxrIS0KVyNQKgLnm5ywY96A59C8sei/dGwqo09EZtdhaQlKHfoyae3L\nE1lpmZAX+lpXbTK9exr+GTm7hgbmmV/fnxRmeiG6aLxGCKML60hujVtYkQSO\nIKJZdqYRu+xSUrHP8BSaNXzWkKlf02p/y5Q4cF0oDkHMDIBLQL2PSrLyamla\npHV78VegVTtXeIgoFZ3r2+cCAIuVmyHGRbSmZPph/bci5c9Q+v7BRpaVzkwY\nMP0KJt1oCHVtIyUNi9NY4zMA9jdszkJyaV5FfcTdMnbCODzE7I1tLh45J/cJ\nSkkppkeGf8nGfWde/5dxxZLlELKHF4er0tR5QbcGMQ0hN1j4oSNfwtqB5z+d\nizppGN4aaxCxod92kCHDZeFbfZtFDPilXUCvcnJSQHsqPBpWztrLvOAdcUGT\n38fvaUFfmJS4FJ9JZVgXiT8bNWfb3Beis7kICg/lnivSLaRaBvw5aqDccfe5\nLD8CHU9hs9aZLMtRdhMaA+r9hkHjl2IKEqE0LQ5eFOn+sV8HyMNxvvBSuWVR\ns6QY\r\n=nqyU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICb9e81gGKVTBqxTjPOIDrt2o1dYRkC6xPO+7xxjzDiOAiA5P3MICosOTsuQ/GpBBy1rk79zC5nqnisRC3ncgrpqVQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-nortissej.more-error-handling.20180803224712_1533336555679_0.28276634072176154"},"_hasShrinkwrap":false},"0.1.0-20180803225050":{"name":"@atomist/sdm-local","version":"0.1.0-20180803225050","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"e12d29560617994ee2779280ff9d263d9e7ea977","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180803225050","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-lxSCN9cRt6palzOWgbFA1ulonS6K2qP8fHbdPFL2Mpf0EszrrYQf7G3AtoxD2Tkbk5oypr2GZ3Jwu1tlDRJCiQ==","shasum":"17ed8a7df16aa03833231d56d9de8cd5a8e63574","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180803225050.tgz","fileCount":509,"unpackedSize":1336381,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZNzQCRA9TVsSAnZWagAAvwEP/2eDb6TjdQYB0tB2Lqla\noYuM8gCxZjqXb1f9BrAo+zd7xQIh2v3BtXBqqo0hR0aHGEIydEfsg4pboQUs\nSwM+5jKQ/piNVcIfMBEO5klv5FlSVVvt5/AdJzs/j558Xrxq1CPd0t5kkjEw\nad5wD/kw5TKenXW2FO29wV2Wz3jZ7hLKN26D+IrEvQkc5eRHAmQN7Sobvya7\n6RztoMUKskUNbe/oSKNEaI8qK3wRqWvH3IdlvPaHLq3meU5SWCacPbMfrphy\n6AmacRNeTRgcQQLNP88syCjmkxSa+24BcpVSp/lS/WP7n804MmfbHzGzJAWh\nLRmwrC1Nsv7ZXN2kfs55xkM6cTbqSlRIkOFh41FMVRTk9afXIhRap0+a+Fa5\nV60XORExc0BMAY5t+KAkjq/ChafAhb56HzUEL5s9i0z+34ieYAb+P7o9rtaR\n/AMoWiVJX5OyCODjhS0cFTijTURgZkf/TpAjRw7pjPmTTwRSSaMkcjSGYGM/\nyXGI5vTWWI/rkbCqaSS0bT2pZXbR1A/Dxa7IvfPu3PLvEL5a+7gThMNoHAhq\njlestMS2QRn7EvR+tcLFbW6uXA/FnJCHuoF+pZP9vBNLIYc+XOObt9rccBXZ\n7ryENWYnKf17Jv1/+ta7CAsvaPMzVy/BQYbW8DrxPGpJN2wYH1iTsvYNmn9d\n/jLM\r\n=iML5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFWlj9B2WGE0DQSuCw0Yo+i2AyGdVbINmrCF9eQPkruTAiEA2I4BIR1CBerdBR47SjVbf8l2HYO60+3HxJBgLKCKtWA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180803225050_1533336783598_0.8631310861250625"},"_hasShrinkwrap":false},"0.1.0-nortissej.more-error-handling.20180803230402":{"name":"@atomist/sdm-local","version":"0.1.0-nortissej.more-error-handling.20180803230402","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"4e6721e4458fb914e88a23790b92000271ec7013","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-nortissej.more-error-handling.20180803230402","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-7U0rjO1i07uzlSk0sNxWKV8SRZ4/b/gVz92iofe0oc1G5gwqs89v92ZMhiVAtWS0oBVYcKjUKXnnxnNpse427w==","shasum":"de340f696be1a2a736d95cc6f14c42529f1a3f42","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-nortissej.more-error-handling.20180803230402.tgz","fileCount":509,"unpackedSize":1337453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZN/yCRA9TVsSAnZWagAADwoP/1tP9UoIecOrpQYNh/u5\nfiDVn1/lsg3AvqsDhq0dynBDYZfmzXZtXSNCMQmWlFktEz5QJ5ctUK5hFxdC\nAKJWSKudvfRQeZ87peTVKgQST+qoFQlqCpQdNJnGEXXkvG1nPRR7ioTjNONw\nzNN4OV9M9W6QAiV5NLgwKHZeXW3ghg0GXN6ntUIxSRdIbasz+HhPxFysru2n\nelWfMnJLqjF3ABUNXA2Lm3lSv+IVWNoCnLuTKZH+rQiWQLcnQy4IfhsbDG1m\ng+D8Xg+nK8mSvXjNQRWpAKica54kQup5/Fe6TSK8P5MHt1sWTbzC4B2nAN+9\nLlSIk0W/J+I1qIU1d3wRZX8t5B2X/4otqTH1wa0RIK4wz0hZt8Ejcs/LEeLE\nBFe+qSxNJuMaGsVU8ViqH5XJwdE6Z3OE26KBuzfv2/jo/8JJzra2pFlX69Uh\nuCk79FnFnAbP1EoGPBwalTY/jceRi+rDwnUBEXl9PLnbj4arb1CxglBdWmy3\nGAMFs5yGviZLaK9JOEAoRqZrvpzOSVX3X7bbkWknLhXtD/ZRStImHuK8Q4HE\nM1lsuhdzZ6iC5ysSA++nXFs5JqyDOBdNnGLJcMjgMHaSzytDB6aqTePt2HiE\nAnu6nC9t3cHsVy3ZjdysPlqmvWDss2SIQXqf2+PF8BMMYbbn52Auslh4PWu/\nZMBn\r\n=sA6p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQGGw09JHGVLcmIkZUWXnGhDldDExmOBilEN3LKkTJMQIgRacr4bkGUjwQ3Fx78ofCRZWnEGBqh7KbqtlwquF6Mco="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-nortissej.more-error-handling.20180803230402_1533337585629_0.9063776157307413"},"_hasShrinkwrap":false},"0.1.0-20180804030110":{"name":"@atomist/sdm-local","version":"0.1.0-20180804030110","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"5efe95d9b4100c1dd85c5add27eced40522bac34","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180804030110","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-f+LX6Q1qLe2JXojT+ZtAsq1NFA5UmA/kyJSpVjO04KvFF3wIIRNODzd/b1nBugZG+0keI3uMRipKuJ4j4pGisg==","shasum":"c686a3c2c7906ae32c89e32a1f3df2b4147eab3f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180804030110.tgz","fileCount":527,"unpackedSize":1347815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZReaCRA9TVsSAnZWagAApYgP/Au1eBrICWGX0w/xtzJf\nQ7i9/GvLaOsl+yplNRUMAQLCGF2GRdPvLuU6xo6tmfM1dfNlrZaN3Pd+MvdR\n4KG63pTdSEwhqCyktk6XpSNa9r0ZjS1Sj8lolX0FKeXJjFWviMYm8MZOsNbB\nKmrztmWfye7876xOP4+yQrsMz4svKMQWKKD3F1FspDnOGmycJ3jVrWAZNhAX\nSfKB+esLOMlPOvRCVjoyh/0R6JuOXgjfVfjGKQqKhYiIiB5IfjhOnYU6yz2x\nPnjGIzWFUVWXb49WxIEB59tEkddtDrDKqtXJgk/ds8hzm5Qw+lPLCrnD2RDX\nd+E3KNuW8bIGL+4S4jMyEnMUSz8m433gMhlYIv+eDGaHBkBXKhNNElrS2PZM\n3puuEb6X109/6fEGYJWeacWx/frZvexfNFMocwr3wrSm0jpZKfBJR/6rTmAy\npUZ6mKAAFASvkqzvX7qAfM2d111puhT+TPB7Er5i6AyfOyQ+q+gy4ZbFCGCe\nv3LoQSxWLEN38nzBKErhjTzvA1MyHYqANqe+dpsd594I31lxHZP1vnMMhtld\n+blSwXND5MhT/O8cB6e4tdxnTHjFUfUj8KPg6cSkdilg2AfinjeKKv0GVzwv\ny9A2t9p8YHpeZmJmH5r2l/aajolRAC0kBBxwlIpMEyNqIOLw1U5MhgHvhwHT\n+loO\r\n=9lGt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCS4eHmfXirmYio76g8tvsNLRv1dbI+jjd3Hkw2BHLyuwIhANayhvHGSaq09NS2PSJTg182EmVhgFKgqIbhYYHZqn6M"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180804030110_1533351833427_0.29809437837119934"},"_hasShrinkwrap":false},"0.1.0-20180804032512":{"name":"@atomist/sdm-local","version":"0.1.0-20180804032512","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"db239cc83c74fbb87f88b5d7f52db33cdd0a7ef8","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180804032512","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-O4lmAajKogPQth5HXrHSB0uuitT5dJNSDOT1t1mER0a1jhfWTKawPS3e6jUBUMEZ6reGQHczeUMEA9jGLKHsqw==","shasum":"0720795221cfcb754296f6d2c1215332eecbdaf7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180804032512.tgz","fileCount":527,"unpackedSize":1350339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZR07CRA9TVsSAnZWagAAjtoP/RbIIy2RKSpCWxc+gXVi\n2pjp40v/DLe0Zxc6V9HQkqaPNdHo0UZjuhnHEjtiiYYYIwx5ifmXzmWFNQBr\nIvxBlsPhcjpDzPjdmQGUKrJBNa9lKGHIL7L3PWNEa06kMGhCuGLkOnW9pn5d\nYSdZs4rBJp/jizTXihEVWYP2lewGGT8HhYvSSMqx89WTyTrYlxqZMX6J6ZAj\nEG13I4uzcbqpGVDI5cZ9suFozPghNVG3yF2PqvYFySJVP8lmE3+mqz2hzqSs\n87a5Vn+DM+NxGmPgUuTXRrnZ85g+srzHp6y0oT9FFuW38UHCfgskostFx++W\n9qBCqYR/bnnGpNj4wGViCwrT7e87oHs22a8IPl/8p5rsJd+zHva+4t+T5J2J\nYPx8PiiWvG/Ie+7XQs8c3r6kZvoUisNlDubYBH6meU0HfjaCR87uc6dR6IGF\nXWzs3XdbDiJZv5MVg9zqyM/pb+/J502JUiIThc30Wmn++x8Bgy2p1qn/G3e7\nT4NWeb1CxRqSTrbfdY4zqFhcndeaLRblP5yknOBNDV0J+7xxwztO4Iv5KUE3\noX0wPWcyRdLcQyBJfapp7vw5UErdLRTnMlZ7sqHrE/55g4jnCIVhIO7E4UYB\nRRI1fTKJpaP1ZqtRuV2drL8i8/A3bUiGTrjdPNDmi3fryIharlFBXL0gxFgp\n4Y6h\r\n=JieI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID8XvzTZ/0WGB9HmWbUhKUyg8KIyDs2EIoVSp6FoIRQYAiEAxZunzQWtUk/4bHn/MbTTH40OlarO2Yo3+y/WK6nqIUQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180804032512_1533353274116_0.1540168245119653"},"_hasShrinkwrap":false},"0.1.0-20180804090243":{"name":"@atomist/sdm-local","version":"0.1.0-20180804090243","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.3-20180802154222","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"b830855bd2183070c73cf4da99bef6635ec251b0","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180804090243","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jC22UQ6g+XjTYLxm4FQYoVBy68/xF0wgo3ucV1eXwjY7SHZ1rpEOa4BNgmqK+V2NHOwTN5who8qrcRESwGEAjQ==","shasum":"3e60209042d895ecb192711b1116eaac9cefa519","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180804090243.tgz","fileCount":527,"unpackedSize":1352857,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZWxNCRA9TVsSAnZWagAAvGQQAJrOfgmyt9ow1l0PoPJV\n0aeBUMQD6PLfOEtypHT/WF/4PkPk9MT5TZDDAyzfPONQDHX7sk2NePrgemgg\nPnrtooKnRTKgJuAdd+yphOBgp6ihG1CwCGhfZ2ylZfXdOmoU09agrXlUCsYT\nWA7cas2Nc1+t+gno4O+pbAL1wkwNTO5tPV+65TovtB6BT4cXspdVZeUPJN2q\nkVpzGlfVLRmycVkMVylfBzfRcWLYqouAy5m3xrgYHPiEz3J4CvMAxesT5H/E\npPTLFmP72Glu9AFU9EONkn4TrY3OQqPyCmSgOdK/Oi8URyeq3aour6bk+dbJ\nWGKz3p2U0vcBhXNIHoeEwQSNkAPIHE+ZOUxpxBLTVQerQAOiAO9N1lik32yQ\nn87WcG8h6DUqR1bxKXNSkph1izfxXKoFA4burpJxpMPTGQnCfumP+D9alY7C\nGeWbdfVJU7e3CoBZ7ssMFyoI3omNGVo7BtJ6ywmwumj5mqX7BjCr9/2FXnmR\ng8wYgUrzgTljx6UlN5EEAw9lsNFVRkzzLGByKP6J49eNvvHNnRLVuTDF7xfP\nLD1+c44aIIKtV8QkjBOmy7Nh2C3iBfoFUo8Shc2lLPxECmAEf2e2UMIFDchM\nCEC9yhfMUlrjdznlfQzfRWo4uAIWKdcxi6PPfPSWhiPCtsezOeKRM5SzOfAD\n3zY5\r\n=DPeD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGLxXof+VApbhmV0a7PPD9D+jXOS3KGzYh7Bz/F+ady3AiA9ubcvSXMBrfzQzOTQiFNSAjZsf2D4FYWG1mCXU+dcBw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180804090243_1533373516719_0.9412075977342995"},"_hasShrinkwrap":false},"0.1.0-nortissej.more-error-handling.20180804090701":{"name":"@atomist/sdm-local","version":"0.1.0-nortissej.more-error-handling.20180804090701","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0b6629d0475154129f17030d221060341fad4a79","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-nortissej.more-error-handling.20180804090701","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-OuXyz0/OI14bJ3jLfQLdcHQkchVVFBVQoBmsO/jn26AzQX+lWaHLde0gplzNI9H21CP4GyPz8WKA/n0RrYLNtg==","shasum":"386ed2c9377d479a64b2a0b44407c7840880ffdd","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-nortissej.more-error-handling.20180804090701.tgz","fileCount":533,"unpackedSize":1365587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZW1ZCRA9TVsSAnZWagAA2kkQAJa/Ewl5e9iwJ1y0KHu0\nlk4lwjO/kpNBqkiIEY+iZN3P1PV92H+hqbsQ2trBIr/EbeA1imBR18wWOoxX\najK1dj2lzGvuXdFLDoXWP0ks/QscuAyEUcjxrVk0zqB3/6Yaf7UsN70nO1q7\nO5Z6kjfhrP4OYWgg5AjmmDBvqVB1GKS9LqvDJA3eCLNXEJC0ATxAO/2zVfUR\nWqJeVV+XLnj93rVPr+pjI8Y2IKxmZqYsZjoPeoQzu8VByjjpuXAwlm0C1pjb\nYssvH8hH0CKdqfns1/HKGcO9iCAQzC+sMSP0/qNIxu9Jz6ec3Z31F3kg8Kd1\nC8b6Y/YLWUwytaEBjZYRx5SDh24CDfsqiooJFLB1nd/+FHrWOQSOHIx74QKU\nsGKgUDCNCpvGnW/27xU90XRzNGuTNfUUoF3uk/DlETEVliyMmOlLgpW9bjVe\n5pFiymC842BpQJJJbvSQqzCfvlTc37tz8LmCYZf0h5naVM4++MDQoDDGIOr4\n/Ho/PpfCH27nO3Bo6L5JgPJZZXNO7rt5wRiE3hD+OaXuHF+sZT7l7J7mG6K2\nZrmqKfo4P3+MG0KB4Dg+PFrpbG0Zj1I47aXHtEgeoleKFsQ71nh47TKdWPu2\nKwHDFq6zC3xB1BQ/5HA7iyAxunqqT8SsRg0yYNUXb163jlPOWAoJsD4pM7Mx\nuBlC\r\n=n9iw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQJHkO1FcRdYCGkMjNBqgPIa611Xj1OOSkX1Opf1wMaAIgM35G+bs/dE5WVmEIp/qDESVp7AmE1dLnIEFU5sG5Cl4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-nortissej.more-error-handling.20180804090701_1533373783836_0.9973477240084816"},"_hasShrinkwrap":false},"0.1.0-20180804090823":{"name":"@atomist/sdm-local","version":"0.1.0-20180804090823","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"66e8b20827a93b68f8a16eb8de558950733e69a2","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180804090823","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-bjHBgLzSwkQIpVCFNfhzj26w0FgmA4unFEBeRRN10iWk+QYeUpYlRPIjEVLwLwCg4AAZ3o+J5NGDiccK8pp1fQ==","shasum":"c52522ea9cca7c6b1e9c2c7ad619ffdd6c0ed595","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180804090823.tgz","fileCount":533,"unpackedSize":1365557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZW2yCRA9TVsSAnZWagAA3IoP/1Qd2CoZ3q/uwyoUzPO+\n1+SALhJs1D91Uz3w8k5kx791roOJ9PpDgbmjqn4y2Q9w+D5JBMsD286Cn/6X\noBbm4rn1GbreH777DSjxc0Zs3OXzZjux3appsUJ/nS3zDKEaD5WIpCpGMtKJ\n2E3LWVRDbwO1uqAsW9phDq+5clLUjEeioiw8SceohJeJC///PZ7Snpod7yIL\nv0R1OOm6zGakpbncv+oYGPw/PwyAVHIiwVkpXq11nbdpIGLbmACLYgJLnNwa\n/T1gNTXomDXShS5v/JMpz7XQotUG5eJZYfsY+6ppjd++8jXJklf2RWgGRcyo\nrXjrBEOg7Zib4ZDrSEQaHEgdmr2FnI6BL8o+BGskj/GNDOxgi98JY4fqxUY8\nnDGlqv5G0aFl1RSY7pEl/NS+scx5ailJ0sJjVYiFwzu2ZZAEIdAUTGX+lmnR\ngIq5yOiIbWR5MMhDzElTdhmZzFVsNHiEq/ou3t1o7b0ZtAJkG9J952mDgSDy\nAOStb8bVjxisbJ3BJdLlTMyuHhTdCKmun45pkLr/AfWBjhQHCSjo7kNjyhu4\nss2S1xYUGvv91he1C6XFemzX83PvxWYqYeakOV0YTIlw6d7cYmw4ghJvUXk8\nj4NoMycHcNtlj4kRn5xYI3/bhjg7i3lDieun0X1QrlxCWnmR+Isuv0U8jjSd\n3bmF\r\n=coyX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICagSVI+1S5ABKzuq5+WC0mGKSEtTTKX6ujRYbbJ64oMAiEA0rFWUZ+SjrVgBSk5Zu6GPS95LV22/q9O9YnMzuSSclo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180804090823_1533373873972_0.15232146570573213"},"_hasShrinkwrap":false},"0.1.0-20180804091011":{"name":"@atomist/sdm-local","version":"0.1.0-20180804091011","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"413e4b129b3abe860dfbcc423210e60c8e022eab","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180804091011","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-oINtFPaU6G1DXvfVA6hQyLmIGjmJ1joW3nH59XroFJA72TWapKI0+rBXaoUsBNSa84C80HAcpdAsV6Qjid+e1A==","shasum":"08b2929203261be66a13588f025e456e1089d658","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180804091011.tgz","fileCount":527,"unpackedSize":1352509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZW4aCRA9TVsSAnZWagAAZrAP/3SawJg6Y2ObmXHkcSFC\n9ArWiAC9sPvGRxJ23Q7BrQADUQ3Qe8bddRK0wjFEriRz5G9snYco4votfzgp\nmeq912cDTTDuAGvt5c9QjYPXS2Ch3qZNhUGxGK0zclE/VvC2NweYrHsyKv0r\nLu8TJALwb/UhhI7qEv8EH20tmnbhUrabOPG00czdyphfOifT2KE7Ji0p04Ab\nuycfivOEkjldgeo2+OXkWuoYAjFId/qsh1rCCh0YdH3kNUPHVyoLt8ht5A0I\nYOdKyocwfX4q+++yHDWatjrgER4OWQ2J4piU7sA9iL3cJOKlAkJB/NZuFDMK\nVXOOWPhA64QML13JPCWxgO2ajDk/AbFjziv8szxsn36kPOc/8IK38AyBJzdD\n9EXgx1Nk9ONiCwqObcRv+K/Ql/eWvYf3vEpvrc2I4SgUAIwSUDXRrSPFnC2A\nrbZsNtrRAtRr12oxpXMkveDhk6B1/5RBDbfzDn0gAZPhOnaIHtyxX4Gudyn7\nzdvoXi5iDYipmVMaz/kkfYZPqA8w5KEeLD2OctWLu6hnqr+1VrrwUaviR+GK\nrBZrscB1qmvQ+qd7vxBYcFA5qHJYW20khZQ4TPh4B9fP88ZBnJ8MNBCVlFHn\nHXDDswTxyEGBJNrfT/8AZfms9UOAS53I+LwWQyDNSYna5Y9xWQ0GEs7FrzFt\nY7wq\r\n=ch+K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDK+c1AWIqgRInr7NQYRI/x8GqkPGe51tfZBu0/JJkeYQIhALyS/167tkDP5qJ2T/qrbQ0rlOD/fK5uruxQIlJD3263"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180804091011_1533373978037_0.7480378339232767"},"_hasShrinkwrap":false},"0.1.0-20180804102355":{"name":"@atomist/sdm-local","version":"0.1.0-20180804102355","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"73c0e44c3df188e232601be764af4a3d045b671c","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180804102355","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-hFvA5r/dWb65m9DfJpqh+qngLNO5fcHQQLIJ48WT5Y/5jK9MpiHluFQemq+xrGoo6DgJVsAcgC3MTtrSBxpRtQ==","shasum":"0a2c421d959ad6fce359ebf8d49badc562dfc1a1","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180804102355.tgz","fileCount":539,"unpackedSize":1357787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZX9gCRA9TVsSAnZWagAAjkMP+wRNBS5BJui+vzEvYDSG\nkG96e/sVnO1jf51NHKwH4/B602b38x1roluR777aXrDaU4mwzPrZ+76SKVu8\nyC1HAPwHrLk2ahn4Y1ghFHbWyvep8YVMElyZ0oSJ3ZujO5b/9S4/1l8tDpGt\n+/0s5hl6SKleHiGeLyGjth4R3UJGphlTDdas8IVPC5OMQTiDigLlFNLMRojv\nzoEEULLnFIoJ21I44VaofmYprmwEs99M9rrM4os+2RQ1CzSYnPjuvMplyWXv\nLCcB883ihnA4jGEco8+omxhQUCb4EM8rybjU+xNOMEquoWNWeaf3JLXdezfS\nQVzW7gMmBaa29k8t5NxnRNHaqXD+5q0/cDgtlx/48IKwBPwViqdXf2ui8Pwo\n2en2nJmu+HTvIRWv08tyHbohrMeQfI4XGGpmacEBWQBWmpmPfarBjsB8btdP\nDDSNfklgqsNwybCw3yTw2J4HAgSH3UzEBqRvn82iPNhuXZOFSp+XPFWqYa05\nABMNjy0nMQ92TfloSAo/7Yo18GBKjBFKzb5JOSYOt3KJKBtAqbWvuC+ZjlrU\nmr7sYZkTY+SJR9iqtJSn/giK4cPLFs9YRoajJrw/9uopsKqYkEqwY4276P18\n9IbzLEOz1LcGYLhW2fDKpyiy/vFpYM+kpEQhQAnVFGwAueo/fczt8qYAsfTo\nlzy6\r\n=XX5E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIAtPv0QLrr34tGq84hiTIsYgAR+Ax3iqp4A5BJKYYroeAh8IQIdaSNRXk8i91+Z6RoutkgINxY1lILqjCk8K3bS+"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180804102355_1533378400328_0.9430271240651329"},"_hasShrinkwrap":false},"0.1.0-20180804103059":{"name":"@atomist/sdm-local","version":"0.1.0-20180804103059","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"fe63429e0c5adeddcffc1942700036b7aaf54764","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180804103059","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-mRiArZV86h+Bjja+lb6k54VJQZ/bnTQHL0Su5+949o+Ty3eYvy509oz2u3WJg9ZoyX2XbG16u3PgDXYtg1rQXA==","shasum":"7951a2543d047bcceb05bb8af930e09def64398e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180804103059.tgz","fileCount":539,"unpackedSize":1358015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZYEGCRA9TVsSAnZWagAAGxkQAIrqvNhfMRmF3cdA9tkH\nYIVD2fIj5t8zNdaBkD7LD/MkCotEfJQfNz8DbAxebIluHvhesFY40rmlPRr3\n6gfw2m2L5ZdmjZYcxvND2uIgEQkiXpqmKi6OVSnmyJfQziigtVRvvfMRbL0u\npEp8abZ1yor/tm3Z50ORm55VJnqt7wMTNGvlFO7hDmbtKlcxPIhLhIfZhUkB\nAjI2T015C4wlV2rU7e/p0Kf1TF9C2+VPrAcmryqFLMiAV9Wz0HQFNgVSJaxj\nqghfeZgcMySBPIC748f3Y4fxbtxy2uhGHJ+v4UFDSG4pShV48UJHQ9WrbwWk\nwEa+f51eLoYENNmpFJWS00sJsT5QpNkWEX5o91sZLJIi5eAEneLTAAsLi4Gl\nOC/Jo1HR3ev2kd/zyPQpiVrxIamIGITDyJjj09Tf8jYza8PPH62lzVMxF7yx\nxuUJkwh8IX2Zinaa5tpfgmncq8h7rtnB8h3LlnEP6ThQPOncPGi5fX5R0tHs\nhbEEv07a81eaxyx89Yug83edRgUx0DiaVDphh8HKgVT+MSWZSZp8IWxn6Lpb\nTAuwJnskVI1WkmWqAabH6HyC7CXvXuPlRiEA4RHz7sr4umIDKLTKZMVOh5dh\nLMi3rFrrW0eXpDxZaEFC/n7GB2nGKKnE8Zyr151T2Cri9Xw44+jCyPLzkZaR\nLgfh\r\n=qw34\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA7CWSt+doAtEjp+4J+kTEZZloKSzqLohO2EZXUsCyVqAiAecspo/qAOYomECCClBJCIUvmGRJcMta4Qy8asmcGoAw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180804103059_1533378822442_0.7338504249943127"},"_hasShrinkwrap":false},"0.1.0-20180804225206":{"name":"@atomist/sdm-local","version":"0.1.0-20180804225206","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"f6bfce5cd0d66351f1b073bdaea5b0f53edde6ea","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180804225206","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-JZLdZHZD4HCajiS2J767N7ermVIc4u9e6TGR1V2grJt8OkjKceOWldllZv82pk/7Y+m3QiRpftOV57Hx/Rwn0g==","shasum":"bc1290bbf0014fecc23e3d663a318d36f0c22453","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180804225206.tgz","fileCount":539,"unpackedSize":1364427,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZi7ACRA9TVsSAnZWagAAPpYQAIjFXfBHxP8Sw6ewcKGf\nSLu+TZM18jNWvRJjzySMUcFbgDZzXNqONkPSmUto1wKzMt5mrZCum2EGp4s7\nNL4TTZPF5dcOpRLNoBe8mc6qxamXmzAtmjvk8ZkEfkVnr0SjNk5dlYgEN741\nq/9t79w4t52ndV0mdJXjfifzNwAVEa+AW5CVwK7J7jzP1eXYv6P3ZZL+qSES\n8atfCaQ25Nkvg9ABy/l4S9M/trqrKEDmOZj4+u9Hf7Ui0pG+P+F+gIYhT/XF\n2BWYXg3aVcDkqBKF0dBJdMseMaSDpN8HZUNg+rfYcqGeC/SjHZyE3y7l+x/S\n3YKRXoRVHEMICNoOHWXQ8+iL472rhQhdNtrGS2jwPVD+O/9VEuzGxyZy7qZZ\nhKVxuQb58ba40CVCjqMFChis7pYkVpVuKwpf5gqyMHKOex3WHMCYc6TuW3x/\nnmwlR5cXen6kJC7yzqcQfmMNP5ehISjQO4EHlVFe/dint+4hjTkRFW8AtzUz\nrB+Xy/2ue2LNmJQ6vQe6pAEaov81wBSLDOlZPt8rVS5vNCQ34oaPYbK4eCJy\nj8nU3EKgPUfQL2y9ATy+8s0WTPn65i8NWZDv1ioVigIeriHyEs9BhSckHzzW\nArZMSr0QvVSHL1vfrooY/h8Z+xtgDHt2VxO/ItPT+h9c63kZoSKhl+1F+i3s\nuIoB\r\n=oJI7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkoXDXt+E2V48o42FTrnpfTV2Yq0xYgrmBaKi8REX2igIhAKkZyI0emVV7ijjXA+T+76iwcXq+6RlQ4mB5p+jGAffG"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180804225206_1533423296147_0.2962958561491902"},"_hasShrinkwrap":false},"0.1.0-20180804231300":{"name":"@atomist/sdm-local","version":"0.1.0-20180804231300","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"a41ec6ab998e8dde51035558902ebc3ee557b2c4","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180804231300","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-LrfsLrl6uu10lZrSVCgb+EEy0VUB7UJMcx2HD7J7l2gdZoEFoNwdhmkBGYbClPttsrnFHBdiFdNVb/fRlCHAoA==","shasum":"3f78dceffb5855468ab8e5d732100dcbf03614aa","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180804231300.tgz","fileCount":545,"unpackedSize":1366593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZjOnCRA9TVsSAnZWagAApowP+wXzU3rj01QNU89vHLSN\nociS8/z/+UQ6DwfMIwz0ujfJIWDPwQiBupuPQAMYXMJ8d7/7EhYHgvvNQs4D\nhopgMpM9NNB8tD1wve/NlBK+MZTwc0gmX8yP9iQ5LeRBmnXy18TFZY2eYoMK\n7qp20ro/slo0lX4uH624V25bvLG3euXvtP51A/G/uLEjOsGe2rAIydqt6sHq\nxgoojZomdEQF30u5tgQrVMoQveVbUdZ9dgjgHBNxszWbgnbrmjYNcNP8CSnY\n7HoUPBkF3gM5MlzDj972g+3U3Y2Y02xNFGeqk0pmERChZooxHj2mHZO/Niv4\nbb5BBdNfy2CjXChOjc5Aanb4hoSQYDNbnI2RpSK83TmciLg7o5kXk+1diGfz\nrFD9xWNy7YklCKReMLnOufDDQhdnWxSvBR5s+B5wEzx4E8YqzBy3bqzltwv1\nJ+jMMvMY5jNlTLWZQmWhEVTFAc8GhqR3DMTJS+ayTdKZJoaeKV32A8vLJPsm\nPgB+mIXxrDPHju14woJvlAHUqsKYjifprqmrBuLNmD9avtxnq9UwP8pdjfNP\n7pkLEFih6LU4ZrVq24Jinz/5HdgbXF0M9SRdaBfrme+S9bkPM7SbD7CXA4L7\nqh1FFwXtbVZrHV4VidePCIl/hNls6PvQ8sm+NmaabmNT7OFIdJPXghrqOVbv\nT20e\r\n=Ej+B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBIIM8Yq38r3JYgOQCqh7OrbQbsjSLy7YiaGipKJrDWAAiByAuN9nfMyOQ7tjq9JsGuRV0pGZS21Bo+pDGpgbi9Flg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180804231300_1533424551032_0.31622523968439653"},"_hasShrinkwrap":false},"0.1.0-20180805013533":{"name":"@atomist/sdm-local","version":"0.1.0-20180805013533","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"17bd657ed091fab40c95ffeb29aaefcd4f825015","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180805013533","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-2oWqF4Y2wCY1Q2dT04haJMxK2A52BhD1PGlqXoJmBJl2MafYC9pWYtWr+6eq+f2UHYeGmi5P4Q7nNZBkmFvHRQ==","shasum":"37ac5c1102ffd9a608195a8afefa24c8acf0f254","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180805013533.tgz","fileCount":551,"unpackedSize":1365937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZlUOCRA9TVsSAnZWagAAQTwP/A3MXZTQ9SPV0VPYoi3B\nrcDkxsV6a1erEYSTIztkC/xxWi6FqqScRIbJxhL00IoJO+CUwPN/f29XXb0N\nh0dV87RfilNPI7+TvGw+Bi9rnleMlTHGiHGz6dcJ8pOliFiw4LsVJ4vq6sbf\nxn0nJtm7l5u/KgXxDPkR/8n3jxhVq5pool4RlBSewWGZI4XCAYbqPGVBt9m0\nv/pWhTp7dbz+mgvhLhyl2UkWAjolpwEkld+VCQz1RKZJ4VZvEDF1ZPKWJouU\nMo3n/EhIZjDe5Ns8tEWupOfRCCk9qYn3tc4tYzeiTbV/BiNUQZ3L4DU8QrNQ\nLzQuIGdWoop9dAktv8AS/9fxhvSNnBS1GLvEEkZNWwJI5SUMq+h3KOdeX3EJ\nj2YvhCU62muD6nq30Qfy8MJOcasIw+fnMKUM4ezDwBclBVqAWknEZbNL6LfV\n2dzXZ8sYikIG8UTDcJhnCSc7cb9TDDPtj01GrmHvkwDsnuvsYhmCyxhI6QE+\nsolx/4cACUes8TRy/MiHohrr6OU/EI56Gkmm7q5bPv/2/3t8hQe5AKg9AD8q\n+W4X1DOSP+fNy37bi+RhPrI9HGTNpXvLBY5u6SYp8doXFDCgXHjVhYqJbWOr\n5Lg4+16nL83j98QW9jZdYiDCiETj6kMkEfHpHhFgeUjYP5TnFb1DXMaLEjbv\nfWAR\r\n=a86x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQKiaed+lLoNpqapJOCTJI5uMvqanbwFR3zeqfUMPOygIgRShWstxufnRSzAotpx7Hst48p+7EaofRfcQFo2Jocnc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180805013533_1533433102013_0.6170597733121859"},"_hasShrinkwrap":false},"0.1.0-20180805084253":{"name":"@atomist/sdm-local","version":"0.1.0-20180805084253","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"34c8235cf4d69a8e10aab1e878d23ef2859e01e7","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180805084253","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-vgrdeRmdAuWt0cu5nfzD/viBqW/T/54M0D/WgCmj+OC2QCf++PHOoR4T/v+6Pc1apgsPJ38UutCosJdPBoLCuA==","shasum":"1ecb3221ff29dd0350b96ebdaf43d9d8c0d08407","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180805084253.tgz","fileCount":563,"unpackedSize":1371749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZrkDCRA9TVsSAnZWagAAXQcP/AiL1oKsH+fImgmgr1A2\nDMQ+lWC68FOFRWz7AtLL4UqAF8QQnALysOzwWp9maKNNlAZfkoKyDYk2FzV8\nNuRSNPVvyDdm4096eeWfoubo1PeXpuqlqYVYL/DVf15aDBu7Z9FJJIw43Gvv\n9ZId6chH1vzEDT2Von15F7rf84SGZ8FB/oBzdi7uass80IXn9tqh9Owu94cy\nsap37wtvzIvPOHHRXnk4MxpeDSrKmR33m+8mcKerARfaDmFpkrgtp9nTJdtY\nz21ZcTV0IaQ5EMZNVWVwVPZGpHjtZqgDN5HQScUfjgfmq60XFdu5sbgHw+gH\nYD5Fslnq3W//v/F1mLez1mdC5ZV+70d7i1CxnUo60q4CJrCts06rjN65qKKI\nDVaM3ur+IsnMaQBo/hnoY8PNx4Wb8QLutyP5Y/eYz7IwWGn0hUPsWPr4WJU2\nib4lpHa3RaHrzirPvlgMYvIeyG5b5FL/URrtCg5GjCwJ9iWIh7Co2o2T6MN+\n5G7R2t1cFQoJqFDlKwsYxzsnd/TuIo6oEdMYA7jT9EFHsQfKSX5rBh3pnuSY\n4+fukdMbph6fa+NXvUohvtuzWuuL1X3IGaH6+UofLcq3iJYY55ded7BbQtjn\nq5bLUjK4Sek3wcO6O8EWNTf3lmtSUhDR7Kqm+U95W7XOIP2aAzpnTrvCo8Hr\nfzmH\r\n=DiRA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCM9HWiE0iUtLR8VIrmZL6Ah2m5wdTuBvpO1CTuwQLe4AIgcBeits4MtlPxwi/DWzl399Ez5JJ8BNVZiGUiuRtf2n0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180805084253_1533458691269_0.3417670105165713"},"_hasShrinkwrap":false},"0.1.0-20180805095055":{"name":"@atomist/sdm-local","version":"0.1.0-20180805095055","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"c5be59afdf0322c4ee4273b6655289b1a7745436","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180805095055","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-YCG/a6Ao+7xq/GerleXknApIqrfFqTpvCrfo8stG1hBEUGH++4pajuSqJI9lC2p/A+qjXudbMiKZrMGPdVTKGA==","shasum":"294d98aaf18b12c907f5aa74e072f3bd47754972","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180805095055.tgz","fileCount":563,"unpackedSize":1372045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZsj2CRA9TVsSAnZWagAAYloP/1S2YMi5zpzEiBwKatFb\nprmqppPztVk8BGvxJV6nEpm1GXdnVgOTvpcpb88h2PmOTFYzZDvmYMOl1rGG\nCxd06evtHl1cFbl93kieru6h8YIBSVCAEpmMTiAzPSiwqUcm/jqR9JD50axN\n9YmEA7dyroczI7+n6UqAdZSY+YQnDrnjjJwVspYHmZze+x8Psy4Wz9fccNc4\nL0qR5P8+xefD2rulZJOhlbz3T8DWtv7EHedXwr3AJG797hp81PBo+y/asJv7\nPg+JSJqLqptk5zh5TJUkcuNQLFINDqtrT4fUYW0jO2HbWWUjxF/U9KAkl1aA\nN7dslhBjfBmeTfFmXfBoTcYSJnJkT8vYMOMsjHiNMy1CGkXhFhRq3uH9RRu0\nOwcdCwQSp3NURWX71nxyEmY3uRZK+T+eRuaDWbP1qz5BLtntq5mwz0uKIcKX\nY/ibi1pN/YO/kgrFkmxba0mVv1bSOsjm/nnt4apYznsjdLbL+Q0NWVIWKr1U\nPi7/yYB7KQwvbD9VA4KkWFfktrkdWGwdWH5gqzTkB5VJ4IfLBLHzCem5vCEf\nBf3KgBp9LVC9K0FrD4QKaPLgjAxXQgGUtoYAeN1Ut4kap5c6PqOiB1uYR7VN\nlwApxkJBVmd4tgPQXn40PF3p65sCZU5BglvQeLf94quScw9VOn+3pckc1j3/\nCJVq\r\n=vGl4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDp24583zabEtjXiOBGWJK0V4i/sP7w8CHYEZ4KoUIL7gIhAK28ivtNrvwX5XhmHW9YV8jZ12EA505YJbHpfxj743Wf"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180805095055_1533462773458_0.5086520095252542"},"_hasShrinkwrap":false},"0.1.0-20180805104606":{"name":"@atomist/sdm-local","version":"0.1.0-20180805104606","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"9f0e3239c4bd50a7e4a90b3d17f66691c04a5ff0","readme":"# sdm-local: Local Software Delivery Machine\n\nA software delivery sdm.machine helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines (SDM), see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push\n      * then changing how it reacts to your push\n   * Creating a new project with a generator\n      * then changing it to work from a project of your choice\n   * Changing code with an editor\n      * then making your own code editor\n   * Running a command\n      * then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n- have an SDM. Start by cloning the [seed-sdm](https://github.com/atomist/seed-sdm). (TODO: create a command in this repo to do this)\n- provide configuration for local mode. \nThis is safe to commit, because it will not change the functionality in your SDM unless your environment sets ATOMIST_MODE=local or you start the SDM with --local.\n\n```typescript\nimport { ConfigureOptions } from \"@atomist/sdm-core\";\n\nconst Options: ConfigureOptions = {\n    ...,\n    local: {\n        // defaults to your home directory\n        repositoryOwnerParentDirectory: process.env.SDM_PROJECTS_ROOT || \"/Users/me/my-code\",\n        mergeAutofixes: true,\n        preferLocalSeeds: true,\n    },\n}\n\nexport const configuration = {\n    ...,\npostProcessors: [\n    configureSdm(createMachine, Options),//  <---- add this\n    ...\n],\n}\n```\n\nThe SDM works on projects that must be `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$SDM_PROJECTS_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180805104606","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-pkSBXS/uNijyftuZ54qiWP6o9eZu84zBm2fpGbExGsP72gF8F4slv7/9mAt59Gb6Nw5mPyB8SiCpwf352A2CqA==","shasum":"475e5688da69d0f53b6674d9dfd98089a14b5e9a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180805104606.tgz","fileCount":563,"unpackedSize":1371961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZtXlCRA9TVsSAnZWagAAfF8P+gJvtx6SnbEp2zIJ1cmM\ni1wZaRg6BMdhbnpNCqbsmpKZvblZ0iLWxp/OncYA5Xb9OqWunRUhcdfbsqZU\nEeu3iWiOVs2/MsNh0KZSnE4mH0losU4qh3qUhDBW1N+AVBQO8K/t2Wx01ei8\nDvgbibK37ScuYtWx1EZp2UNoR6CX/K/MbJ5i+xB65XyI+nFjxYbMX//5LAE6\n9/nky30QXFPtqA98M8AM7sj2lx9cVbnJv1uO/WBVsbRMH7rIxzThBfrLs98o\n2DWxP6AWp5hbzPfkzwysZ07tzJn9bGCd5P5o0uUE8N6tzal/j/tuZf8NRw78\nlZgso0zUSXCY6MnSEOdgZCcTQOtPs9+1Bbg2gUHb90Y3+lHJOI4fygRmX0iT\nKz270YsacvUa8YBzfZk2I5iGKuru7LGZvjFvwrX4EGMFLuakhngS+4bGSkFF\nO184BFCmUMRm7XAB6pT3PxGRs6Ts/6i16gzv3bEiEjW/+bzosR9hXzB/WDhe\nYpUKPm8td3cw2dEaSUFP+1zgQsEOhDiD4Q8SDnjSZXT1mXdI9qrJTpKJoDD+\nBZW1/aJGAUWU6CJLAc6Npnnm9MY3rvaarAobmA3iDUUL4/8hRVNh3A4/fGZd\nCAjpXeGx1SfEpri03/gKcB+AmvKkrpUpYbCR9PJCv1IrD0NJw7K5fSsjXqIO\nDVN5\r\n=Dce2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAln4gVlez+E/BErgtRotkjpCjiVoe2eX5iFaOCip/dgAiAvV605+Szi2Rj2Ly81TGhY/28JHqBl2P0T0jm4qBVdiQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180805104606_1533466085117_0.8344352604262308"},"_hasShrinkwrap":false},"0.1.0-20180806011106":{"name":"@atomist/sdm-local","version":"0.1.0-20180806011106","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"39e6f1e9b29502ae99f36c793a71a24ce88b720c","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180806011106","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-RrO6q27ZPLr6NvDamDjZKlShXhK/4oIDym0kmTqa++M7+hHXhhYUgWHTtdk08ztX+W2sXrxiQSKteYONng8zGw==","shasum":"20ac74bb51abb7a01ed63fb5eda520af58a501f5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180806011106.tgz","fileCount":581,"unpackedSize":1383777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ6C3CRA9TVsSAnZWagAAITMP/3V8Kwu49ahLev8/7Lpt\npsTKku/Vx1qD1V6XVksrAvczJwPnhD5f8SuNonxzvwehakkbH8jlggXWBgxs\ncuUbcUzhp7PzLww4eXeqgsS0Dcc3aTV4vpEeZiPXDkDFbZQ1xyMeRxT6B19k\nBzAOH4yAmIZXbzJC7wrR6ZRCBRqg45a4Q7FOhWdaj6SLKvYeXUOVskLBWz6f\nQYCISNqxKKV9gk8QcuNt01spuFBOvIbV4XpLMpuxi+8dP4MLdXmJwe3Q7kcv\nGOrymgSrGhZS6VkoESg1cya3P8fwnt1tO7z+m/pVAoYDXqEqlwaT8AgdFWlS\naYjpJilUQERwNslxSV7G1G4L6HestWR5PWoTh92eO30DB1cPh90YjqOqVXfu\nQBmZ7uAQlptFan53hqI+IVx4K/effVNvibB0VAmr4SbgFEZMIV7yrAiqW5J2\n5620kOzS3l0E6NGkmBKwB3jQ5CtGrjVjf1xBChY+EvIj9kRRHMPJa/tonori\nUJryd28uIDioD/kR+lQ6RDD2Yh4+bRxVhQgy9bitEPL3V2nXM42Ueho29OS1\nJmX09ZljWagFl8pWS1zMN+5vQomYW2NBUv6jBNuEfQGdDEL9mz9NOcrhto5Y\nSmaYualY3RZYmKqJbc0BjUBJh8Mfuazjsq5n9JnWcTltAGGj9buWRCg30s8c\nPmBd\r\n=UoTl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIERD2343qELhBzfI0R9J6r8YuCJXRtgZEx3QnjF9tQMnAiEAqT0RrNUjLw0S5YK0pUVDREDqTHMCuorAKEIsj00ZXJ4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180806011106_1533518006232_0.9471969264982671"},"_hasShrinkwrap":false},"0.1.0-20180806013045":{"name":"@atomist/sdm-local","version":"0.1.0-20180806013045","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"6c581795a3fd5a925d938cb4cccb18f7f84ad23c","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180806013045","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ufFLiO+ou6T6nV2dd1+7pZAdyqDdatCgK9PQ6lEoLhLH2oTFAR1I7s9CmP2iH4Pg4AMx6eFP945sl9MR+nmg6Q==","shasum":"20026222cc06ee47aa5f84fa13ca6fddfbf94ea9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180806013045.tgz","fileCount":587,"unpackedSize":1387551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ6VjCRA9TVsSAnZWagAAmDkP+QDW3IFj+GTfrnvja+/V\nJJ3ucI4g5Jsst4DBoxNf4tzcUC9tzukCwfQZPuaO85wlpR+VCy+3KdcB8PWe\nD0bQJ4rpuUsy/hD1iI7c1pa5dxxhLr7vTlIuC032s2xNX2+D7b52Xrlr08aj\no7XIk9DqXGsGAZbKhmdsbtjrsGTsZ3ZnohF7LWHGgPFPNwuokQh986t2Ag5y\nnY3NOrSPnvEStl1TGDM53CY/bYO+vKwRsPGYqxPpTaPkSbc+AF8ma07haqjD\nmPPjAKeC9Qh4Uole8VGEL2W9+Vy26an4+WP5ElYS8IZGveB+a9gte9E6BLKj\nFeosDZ6rM4FnzIC/1JVarJdtWEjQ4jOm+lzwmiJc7xQEmHB8pgquBDYzuhOK\n8BEhZXFCly1DymBdIG23zebeWnu0jcIYULsEFOpaI5Fo6zukJ2/BYBW89Ogk\nVmr8PUBYSZmsuGcdQ7cdDUX/Zbf1+bHnRLzV12LdIrNaU+QTEYK4OnIUKnN/\njkqpAmAMtn2IhEOqNNAStCpTOI6As4+sm5m0fJOK+4x6zkdiwJqgVwoLLpRo\nmEAUQLu0IuBdYr3HhqSUGAdvoXzFR6A2C8257aFWShKFXir+xbphrAFvnRnd\nI+jlhzmOCBJXsBXyShz9MwIe8GiM7+b+x/3O0oJKAeazvj+NV0qfSywiyu1r\nE+gt\r\n=R1Y8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHndI4GF7q9BNGd7ll5KudsbfJGge3/UJ1Bs0jCIAfMpAiAT37J7o6PNiM4g01lRCV+cDIqqIBdJB6plDUiNvOQF+Q=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180806013045_1533519203365_0.49307976428584355"},"_hasShrinkwrap":false},"0.1.0-20180806020457":{"name":"@atomist/sdm-local","version":"0.1.0-20180806020457","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"00ebbcc19c1067ed5b38e1009c132e2210947c01","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180806020457","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0vOOt7ILSiGFIqev+K5SLmLJCdgFf9ntvg0hAUEctGqvD0gxyVuI7Ut3w58FE9eX2PRmeUYRFt5UFsL1Jcb07Q==","shasum":"c66832c4d5b552a7871a932a0829bec2b8b0962f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180806020457.tgz","fileCount":587,"unpackedSize":1391895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ61ECRA9TVsSAnZWagAABfkP/1Jmyqz3YF200eOwdPkE\n9UBYRHDHMmp2DpO1zIXbJaZhv70L06w/zq+jKkr7MsLqwrmhCp8aqOaqYEPk\naOXMNBi1GDL2IdVh71WMiKPi5BIgx4PFzo3ZOC1CEzJTeDJkyl5WiF7puaNI\nqjrPbaJU9Rr9iaK3fdbo26XhdSdG1X0+fsRy46wYRcrxhmd0BlbOKnvm895a\nV194cOmUckDHgZKXQYwMv5sTMDg/Mbz5HqPqADRHlqgY0UWfFh9P2ubwxw/W\nXv01rBVs9dRBYK+lEb4GHAM8qfbSEh+JpG3SL6l20f2QqEEIIfVzjQTm1buf\nNU7k0w78WIjAC2fNxaesUoXO5BlcOGRmeHJ2LLUTzZGy+36hWvhrEw3/LrYG\nxFNilF5ApS0s2pKr83RTMIy8jYTGutF0Jv6tZS6+aToR0r9/eRb7ub0LtgAT\nf8cY6D8/2KzhuBu52FQo8VBbsLGfjTSE0Ll/RAb+CvhM1ImbDbOEtNQXsEBD\n8poOChnDz1ZTe05QEc0mMfjmJI9PCg1pXp/1u+hYFgMq+pG9XBQvYd0vnIqB\nPRCpznVnxjYsOjz2s0b9q4HzKUJGR/WbGN4ymbYRiUWi6r2MQYFDdV1qp0c5\n1D5X/Q9MoHwN8jzp5YQKQfhsrvNxDiX6FOdfSYN0I8wKirr7cWeFxlDhcU9H\nUQRW\r\n=AN3e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHMztZYAqxDfrL/3ZUieKhcNMXJkljlRl8o+fbwyElr+AiBLtCi0pLCnAlhhtGOPocZUWmieGLQ8UGP6Abk0cL2PBg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180806020457_1533521220216_0.45630435290424565"},"_hasShrinkwrap":false},"0.1.0-20180806022138":{"name":"@atomist/sdm-local","version":"0.1.0-20180806022138","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"6ba58bd0f9d1a3078b8261901f976705d0f87b42","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180806022138","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jOzxwgY4u9uYM3H+4hx7kZx+Ur+I9OwDcZlQIl/upLpnsT7yidGF0rreEK7MwRSpocUd5M2h2ZeQSPO0rnFPVQ==","shasum":"d7d0c1b8b76b3d07eaa748e5a39f222ca0716b76","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180806022138.tgz","fileCount":587,"unpackedSize":1393367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ7EmCRA9TVsSAnZWagAAWKcP/jA1VOB4wgH6tpgUtj+K\nS28GeDtKgtRm5cj1rixigO7lan90uOJXJi3dcZCJvb675UkZOg/dgGhWgBot\nXCT2aMV05SLUA4R3fglO8M24aKy7X3dlUKizLTc+ZJBFCzKhTN49ggI57Q5y\nuPYP0ryY5pX7MQCnn+QwBgKOYMNxIOuZMrUHYffGLaNIWp911caWMDRXcRPx\nFdvp9WLVxbj3J+ZzAFKuI/eBSpeWtisjJxKaewOQ0aUpMsDMKwkcaiqB85SF\nu153BxLFSR22obr2qMJgD2xcdYBqUP0QM4l/OvinySuXXOZCtj2PbqwOl+wq\nZ1Qlhk1X58OXon7C8HxrTnvhOkdTK5TBmvL4R2P8ZkBN++NseTgF4IyR/a9f\nEv59X4T04ABMp+7Ser9qvXwLt+3lmVPpPOr1DcI1KvF4h3CPk3bQfqCgN3pa\n2UdkMOeEHnd812YaHx7ef2tkEcJkiHMczJCX1fV4LU4hc7S9AkwirDN98srm\nlKrB+c/BJVvNlRcvkYlOK9o0QqZBK6+jDKPLVWD3HhAoiOp3VL2/fKWBHGKK\nXF/Pm7q5tdSb+ggDSsxtznkBUfYfV5aby1kwhn/GiZ8HshdXZUh2P/9KdtmN\nU2mzXiKo80sBMczIF5xirjO6qLls+nPozJeXLBLWT2wtcWkjAO+r1WiWzMR9\nm0EI\r\n=cxBb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8KHovzrgwLpd1koEOOEtYghar/rI/w5abnpSF0XJjMAIhAJ6PLc2YdDxju3P9pubJryZy+yGUJl5QCPeQEzsoUMx6"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180806022138_1533522214415_0.7963175687053463"},"_hasShrinkwrap":false},"0.1.0-20180806025004":{"name":"@atomist/sdm-local","version":"0.1.0-20180806025004","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"31b1fbc76ff37ce2006cf01f57f15be6f1f5787f","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Used for routing messages back to command line.\n\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180806025004","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-hmTy0MrDQP2b+3zOlOkaB07kFr+cG3jrmFg/suoxIxrW++CtZTING/9xgSqrw2gpDq8oavNcGZG80H5gJPd/pQ==","shasum":"a329e62efeb18ac110099410578f03cae1f6ec10","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180806025004.tgz","fileCount":587,"unpackedSize":1393745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ7fUCRA9TVsSAnZWagAAsykQAJ1+EPt+qgKI4w3QF74I\nzOOM67WmL0j2ZBt90kEZcF8Vu40jWIzaAFQQLjReuMk4nmjBCViw2hHnwonK\nBqHwen5/GygGRZKVptqYrD8QFbQi896cLNQzlWjJ5IzSM0xurhBlZVciFGiV\nJG/nHwdMDUor3tLQsz5ENZFTEJzJ8IfTDmDDSxp1ldQA3GN8nN9synEARXau\npwr67Qy0BhQKzIX2zqS1NZW/8PUcrjljN62+qemxZtBQK/zCdODgmVhAtJ+3\nSFFtT+HVczCyb5PgB0iAJhuwc9VbqQt1JCt0+eDgq9R3dGObUJ8yQxP0CXXp\nMvcrW0qwTjyW6UFrQvygYw8MZKMiEbUmsphhGQXoxoR6MoGaOPGCl1ce/RBK\nVgEnJlXxZlA0b3QasO0DUvjW97+JIb/LzbTFrwprTGgN7VTotmtC8GpgrsLv\nxKmWx2R5VN009X3rcppo4ZEoteDFBpW3/yikglb6cWx9b9T5G8jtNya5O9Qm\n4xmGSLIthrsTfS6JuAJL7Gm7rilEcbKVH99u3mJC00eKnp9kcvdKGnN+tvNt\nIwJRiF56RgyF2wzXcx/TXTz6lYZ4BnTGZTduxTf1ZJAPP/M/8m5GdH2JjqBG\npsgXKHQ89pwLYx3fz7PoSqf2ghw19LW8+KYqKOxUIOJh6mLtMiK14UiQ6VGJ\nHio0\r\n=EFDn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAlPsUtIwxt36rBabiMiJh4TvmjuXSuYL1fuNl3699iVAiBuoTLzE7zEutHgqK8OLCmGDnwURsmx1P4wP+1KGBGwVw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180806025004_1533523924165_0.15593013179398296"},"_hasShrinkwrap":false},"0.1.0-20180806042046":{"name":"@atomist/sdm-local","version":"0.1.0-20180806042046","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0a359eac8eda89d415822dc7306448c123b95cef","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories.\n\n```\n@atomist listen\n``` \n\nDeliver SDM\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.0-20180806042046","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-92lzfdRdo/tfHYrusT9044PYiQg4U4R/uiiB6oZzZXhkkN5K3EVFgJofQIohmcSWVeXvkBqSL6J73OJUTXAwhQ==","shasum":"42fecabfbf265aec84abe532974a9e3fb5aa6306","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.0-20180806042046.tgz","fileCount":587,"unpackedSize":1394398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ80cCRA9TVsSAnZWagAAxF8P/jaGViJh4hzYZ6UPEopW\nHlix+ChKgJlRGu1GcxHehYWM9fAYU4VaCTbVtuwzqY8of905Dqa1goJoKyGv\ndhzMcFU2ZPHyifT+0XqGuQ495JGIGXlhWVEKwxnQDE6/m9EFl48G9B6ih0Ac\npzfclaPKLwwcW7areroqfLYLyT6wloiOkYzUlB0Wq/TKt7fKKwhGsO3fGjN1\n5onEDJ/x1VOlyHEu7vkXg87W/rfWic9Si6hF10BuE48lbIZ3CwjttG6mNdSV\no0z6dzka23Z2elXyr4hnuRVEpugwcu/BfIMRzwdGr4DGs1XOLbdd1tpaKPge\n4PEOhrruVYOTuPZ3sXRZw2KK4YD7NIEw+pAmF0NeJbmUuVEnuMsnXZE3yT6k\nRrkfnJtkA/1J93EcKqfVgH5RUE7h9NtXFMQzV/kkKLFFVBMX8E6KxQIzw+jz\ncHW3ibfs/10fUmIHPF8fHpjp/yfqwx4kcgTOiAwXhKmAWkaMraqq6AEvHPme\nByJAYu3x7guJ2I0xhvQl7N1Xzwd6lzAhuORvpzwqYBnZWPpH5t1NObTIqPwU\nPRl8d0MrPnyQ6uCTCQh5aYgjCpfwBTxN8lX19ENqKzKUYfiheF0CEfaWfh3n\nBcycRenFWGG6sOP7i3OpPopQLmYO0kjC0DmBF2enr9fo3gt+mIptgIgYi5iX\nE5sg\r\n=dxtA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD12Je+RuS7MxNo4PhjWQ/d5wxPF5+wwtwNsF56ML/9cQIhAODtYfnMApuPj7kzEMCR+jdKdXNTEnN9lnqgxbYFMMQ3"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.0-20180806042046_1533529371721_0.11094026903146315"},"_hasShrinkwrap":false},"0.1.1-20180806042626":{"name":"@atomist/sdm-local","version":"0.1.1-20180806042626","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"7e338b5ae09ad539bc5df722a7e2b1db79b81365","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories.\n\n```\n@atomist listen\n``` \n\nDeliver SDM\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.1-20180806042626","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-wmcPRJY3FN43yMX/iReFj6HTDuj5G60HqZpsFMNhwWEDoXRFsu0T1VzAhC8bheoZ+ZBqqUDf6J3xoazjvSpo/g==","shasum":"ac3499d5627a8855c78284de7f598f0938fbdaf8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.1-20180806042626.tgz","fileCount":587,"unpackedSize":1394398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ85uCRA9TVsSAnZWagAA+wIP/1aZmocf4Q0VfZqcpxqd\nz11dE5QFK/BOXiYFsJQbcKM8+0RNSqIF9KLRyCqG+mtR0AYz4qjzFCke2EwR\npk6HTIjk1UdorWjLCQc8+Ie/kfJnRPN2RajSnQOUMFkZ7/d+awbUFge2JI64\nGG1gcWrAojFDYbIj8tXEbYBd3NYJC8q2E30I/ZqlLohqyz+TMhJ/uVsQ775Y\nCSA4mpricHl3DIwqNra7z092zfyPEdYrrC9d7sP8DeHZRN6nK0iiOtUxCybz\nZsIWtRv+vBK7ipSxYEETM+2X4RZ5lMyeJXOvWKdngSeSeByULazbLgGzk85H\nonPhPLEQiTvXX3aeO1NqkqvKgt8kTt/BLsYKVIHI1yXO1OU8y7u2DqBb1Yz9\nKd6GwT9EeVt2dE5NETmiE7B05/IoRXVDOV5YbIwJ9prGcpaYQoq7IoK0Pwto\ngP8edf9oVhf3E3Hg1kE0jK4KJyGZR2Uq+SiuYI5UI4kd9xj+gr6Y7vBIFDZS\nRXyZbFcMKTtjueED0f+jCt66g8BBRyCM7OYvPgOqGvTVdu3tPLGJRQH4qlHN\nvXF5nGDpea4QiIaDqTFNYT0pAotvXN9BbWhpgt3fe8i4H9jnUi7QHJyglYgI\n57hawXgArcRRVcUMqfuN19+Ky76ZR8SsBfyvYxeLIhbDmBJSO2hGiA31CmK3\nihU7\r\n=Z49D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGzR7TTevzTX8D3JPYkftUXpBO7UgNTa2eaEGy/LvkbEAiEA0rcKHuQtWYPoRM12i49xmDSJhLZq1R1MFqCWQAkQb6s="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.1-20180806042626_1533529710010_0.7592882306778306"},"_hasShrinkwrap":false},"0.1.2-20180806043006":{"name":"@atomist/sdm-local","version":"0.1.2-20180806043006","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"cfa4425a16c80469ca3aa48591b4d30951795865","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories.\n\n```\n@atomist listen\n``` \n\nDeliver SDM\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.2-20180806043006","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-XKh2Xo5dtUH+LeBRGggxb9cJYqQqFtz2R7EzVxlYsXVCQdspyuDRbXx0IiB78gI0X1rRVdgH2RGQjGeHbeh1wQ==","shasum":"60cffe46c61efa76286dc0b99ca3aaa544dd8b82","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.2-20180806043006.tgz","fileCount":587,"unpackedSize":1394488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ89HCRA9TVsSAnZWagAAk/EP/AyB0dMiIltW26lzvsMw\nApTdiWwV2TYUxRrtFV5Y3qGHma7zev3S9x7/rt5SfRmJOFh3fmWVDZMVImFX\n/qgWU5UHVc6vY2cZUFTP1BAyxol325yQdIAlh1VrDZIDaw4ffwFW5gne0S8o\nhoL9aDI7xTdzOxMsLXm8LCxCAjVzH/rBsIjCcwonE85fXsXkrs3A7SHzStfM\nua0IJtOIuP6KF7p7da03M+UR/gpBVdfStaf0/CYF44GDBA5BGQR9Z+DDRbvg\n7m6dulR7erOhZceZVm/x04oIFRZnei+MZYTdACATwHySPXwhuKhbC2TNQPUg\nBy6xLGywEoaGtH8cBqY05BWzlWCcnfieySvbAZE+c6XxVwLHnH3oTOcBf/PM\n0l/lCEFDcQR1nDZr6A9tz7/Z5J/z2Wq4Ej1YVsv2sy6cTI8thbt1vt7CdYC7\nlJiXPxaRiyx4SYUfx+Ndzu11ONSGpQ4GMkFcaGHm7oeFmdAV9SxGFZWgWZaL\nibMF6n4V8BoHOvFibr90i2oE9xYZWHMgah0wrdS5ERP0FEpXUx7v+uX0u1AY\nIOf2kLL6YEpUbp4/d1dgKwJ/a+0cF0TPGGJqncck2I3vTToHzbbBPm2MyDAg\nPT0vvRjiopzYOubKHiBxDHqnwoN6g2GgipiZcjg93Y4PBqqnCWhDzvfYjX+f\n5LOI\r\n=3jmZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8jk1vQSVGZQCQ3ATlA9KpKW6asYi8gG6a/Kd+PhIDvAIhAMPSNuFdVljSKKUTlM6xhOc0HJ4N4g/ktUol8qBVAdqG"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.2-20180806043006_1533529926542_0.27904490104386537"},"_hasShrinkwrap":false},"0.1.3-20180806043336":{"name":"@atomist/sdm-local","version":"0.1.3-20180806043336","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"d048b2081af8a61b5d640438fa667fe721406e6b","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories.\n\n```\n@atomist listen\n``` \n\nDeliver SDM\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806043336","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-LXhKICOymOOEkuZuUr4WYkJydP4SbZT/seZ0nezweWHESD+X7HzjstMGwjOylMyg+ZWPOJumVkr2SUssL5giiA==","shasum":"1e6b4a18ebe4f5dfba230d89915b73110b5fc169","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806043336.tgz","fileCount":587,"unpackedSize":1394578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ9AcCRA9TVsSAnZWagAAF5gP/jx1IcmzC1Cv8U70PEj2\nHdMEXBRVszUeSpS4IxWokg2C/iXY5c4TkQVj8imMQ0clZd7K9+FMdEtFIapw\nw6RLe6KwbFaQligOkdgrkJslNTYb4xJh84q4JHwssoEFNWuje4ybicFi0LHB\no3fpsb+n7DQoq4m1OBKhA+/REzGjIw93rDz1ua6uQjgSq3k7lJFJmRlxgfjX\nLVeMan9k32wV+vufsSpPId3Z55ZdQNJ8PR8lHq/zz41vZOO/tA54nOkGLJeb\nLzYllywsXmSJTw/K+2vqI8NJ/5pm2IpnjrfVZdePlLbQQimZPTTxQM2M9JBq\nl1Ap6XR7E/1TyjpP+m/gKVD8672rFWGBpPt96cRBfMKVXIkTIBzM4KT4JcA2\nuNYsK/PB0vOoLpxUiuMxIzh5gqXkmXij30LWEzWQTfCQOgEkPpLfGi41tmaV\n0ec09Wdj/UvwUoz82fLJjq+FhDOlji3qfAplIHm3nR3QS4sJKqfCQpp3R5vT\n5y85msq4WUxhcEYa36O6JhRodAoRb+C9f482gZDtr3EhzF6EDJLELQfoNlpF\nAPNrTlExCsTcE4e4uzCMcXGAuY9PV5BQ5CyZZAyi48TQwXhZL13jRNtEddcC\nAS1e3aZiwffPxtOQJDZof21Kep+RyXq9c/hB+jzescz4gLQie8Qo0q3vFb9T\ns8Hj\r\n=fWX7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDta33+4UKaBUaheLByPaMeulMOS8EDpqI4kIN2KqF//gIgUZPOFnet5rLi5dk3A1FGngMx6TQt+T4Z2rL9BrqGrWo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806043336_1533530140206_0.4406435484666935"},"_hasShrinkwrap":false},"0.1.3-20180806045421":{"name":"@atomist/sdm-local","version":"0.1.3-20180806045421","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"35050e4c88744c08d85b02529fe1d177a51486eb","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories.\n\n```\n@atomist listen\n``` \n\nDeliver SDM\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806045421","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-QA8az2UIKpWGHOQxak8UgGrIrChOY7WjJ1tyA26k7J1ZDmW/HaiE9H4WcE1b5zkzx9aJ8ENMajZbUVAcewVknA==","shasum":"5ba9c1fcf596a1610fee9392482143b5750c055c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806045421.tgz","fileCount":587,"unpackedSize":1394954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ9T6CRA9TVsSAnZWagAAGCYP+wUvXg8Cbh9wmxmOaMgX\nhA7XvXJmEYLQntmQ8qsSRFN+WSNQXfXG6L3oBXuCIjipS83n1m9WUTUkgOQy\ndqt0/ezVpajyZwhiNLf76jmbROK1p/HN23ZNPP5mT0gFzefaZgZSjK4GZHM6\nacX+72q+sJ6mDTABE7rbx/4+rB0A36/squWMJJLJ8wt9QvkhDQxbbtNW0URa\n8V7Bii5YCcn10xmmdCCXAIynY6wYrwmwYEpjF04c3ohY6u6BwaRfMaVnjSVV\nYbeNRHgk8DEfB65YPUdZlddof5ezUbpx5znLrowBWBoB+541UApLMUutdAU9\ntHyOizWEQO+izv4bFhaj83IP2BnYXsrrwiEyDwdlUOIX0VC7na3S2nlU/Clc\nXZYoFOMTOmkzVgTpubbX6h6aB2YTrV2ROyStHyO5kr5++p8y2E3hSozSSIUF\nREvNoXH/DKk80Qr8J9KhomJ/xf4fExbac14GRM2oD99HyVKhqAp+azNuV17b\nvWZilL7iMXYmWDdS3OqQabvke77L59rbcM53Zn+K3aD0Y3KRJJMr02JUbe66\nQUvqTTk8xd978ufOsA/lQjSY8u666WEG7lt+QsE/epzQ83AbhXYq9cKGUIqB\nvMl7hcXHDmlUPitzH+wfisrqfV0Q6OQRXh4FmnZpLS51sBKYC4LSfCu8Ra8b\npCdv\r\n=UOfB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiDsqMa6gUGnYkYDgrqIBAxuWhj5Te3tohDd9klMyEYQIgV6P5A/mABkxpHA490QoqKLVwrmPy0Az7ViSEsKzOfeM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806045421_1533531385549_0.004397598641092015"},"_hasShrinkwrap":false},"0.1.3-20180806054636":{"name":"@atomist/sdm-local","version":"0.1.3-20180806054636","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"029df0aec024d297376f4f7e0bacacb9d614b737","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories.\n\n```\n@atomist listen\n``` \n\nDeliver SDM\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806054636","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-QJ0lPy2XuuTMirt7EWHl1oMXbqffHczaN/oVR9kieLYoRLoxGXw5D870AnSZDjDgtsiy7wDJw+RyB7pJePIbMA==","shasum":"05e62a433502fac8fdbc6370d93785e78ba60603","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806054636.tgz","fileCount":587,"unpackedSize":1395244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ+E3CRA9TVsSAnZWagAA8dEP/RS0O2lGIvRbQlR0RmeJ\n9y6tEsubFLgB3XLlk3C9sEgVElwTjear7qVfC7e8ZBvguaMTZkfh8kJTGa/o\nv7aDPdo1vcqZAt1CyyomxY6oS3fTIbVG4/9St3Hth4vARuBM+JmR81syGqJD\nP3rAOABMlAUHQwpSZ8QcYZN8SKjcF62OJFBGB9bnFmuX6BXEB96BUfvaZC8V\nnwjeLNEgx//Vsp+B+Vg5QsEW18+SZVSP5+KEZAMpmQKaO3XCdxVyZ7QN5Xcf\nALDuPXLNldnliGqfxglLpfEi/NTuJ5d0QLNjSE9xePmQcenUPDJQRsToxmm8\nGcjk/bX/HL17i6bm+ayhYupbh4IK9/P1Ge1aCU9W5hDuQbvdcrJe4XFS714E\ncv6tpqZ6XaxFaAEyW0Paj5faNIfevqWKsUPiKE3OK5iC5h9wZKd3NtG9TCmR\nRl6u/TaZWqWAt7m8aEBh3fgAZSmr8/8PX/7iafVXYsH8/VnP6Eykg1+P3/xw\n4vrLfb5/WOfAzKvAg0q7dG2ah/J8rfBIMPGSl27OdIram4WsMTidORkaYi1C\nLIVyvbrvV5gmWpIRd8I1RnyttZyLeN2Gro+xpdKdhPaS8kJ8Bjr6BOtekh7k\n+V4GsN2Yr+alfQSZmqjfOF5Y+9WzGZn5sJkjzLrrEdr2HWjCol3nctJKfI4v\nonxd\r\n=7kVq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBCmBRQKR6y98QHARN9eT4HtkHcShiQ0FyNb//2SZ3LUAiAWLi1Dx0tt8SjusfwrvV2TTkLD6d5lZoTXLNwjdbRmAQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806054636_1533534518915_0.06017020638527826"},"_hasShrinkwrap":false},"0.1.3-20180806063532":{"name":"@atomist/sdm-local","version":"0.1.3-20180806063532","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"7aa4f90e54f13f27f902a8d173ca3e3cf8a9c303","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories.\n\n```\n@atomist listen\n``` \n\nDeliver SDM\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806063532","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-zzzDpzCSPSb0AbdupxaWjuIIiDYvs1Ic6U+Ip6meVTu4AAQ/QVmNlaFyVWKDB1pJhGeXjQuSS6arh+PLMbH47Q==","shasum":"c3d11493c46a9466bb2d33199abdf7a62649fcbc","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806063532.tgz","fileCount":593,"unpackedSize":1398228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ+zFCRA9TVsSAnZWagAA5h8P/jYE0/At4xJG///FyQDp\nEw0m1kwpQZMYXZ76Bm7iDuCvF4G3kM3xJ2lWYRX6NOkjUlsywXeFFFz9hodM\n3Ea1wshvLeasi86ewfsMrXNFvATJPkH+woupNla3XH5gHEP+PVORJaFfS1SE\nzDE0poeSM1BXLYORm5lN3nDD0ed3lSauH1NTtDvlD2PGvxd1Gv7truRz3J5V\nxa6evkmrCyqBsb2rNceV7OWeBzFz0UsaL2Ktr3nviPH/fiaJUMSZvIfsSPVK\nvLNyNFRDFojlEthIBZ6PfGdDz19B9m2nan5TRPppPiZ/3gt8oB2RppoKJvfl\n6GX6VkDGC1gtdip3tzBCBEYcl+CDFdOID3as1GeAgirx0bzmO/soSZ9g6Bfq\ne9SKyNaynpT1qrb4YXxmIN0q4FLYR44k1XjJjkPIabToWByWNGlmcqSzxc8/\nh7YJE93UFGxKNWKXVOfFhwcqjaS0sednsKTVg5826unqAmHUi40YyBh9y+Xe\nZ7QoAom4wIV8OmSHIw5hU3+zZLmdoyFvYrT6LriUKxFGWFYb0m722hVUSYHC\nztQTP6hFN1KEmMiwGVWbI0xUTVEO/BpZD14g1zWBPOikTs9d2Tt+vAv4pFgv\nPepRwIW/jfsHzrDvdjkg5FTGQk+ssduYY5pg5hboqAncw0aOypCEYFe6Xqnv\npPmt\r\n=zb4h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXCRaM4OMGIqq+KVwRG3CfR61PEnYukVPk6L+Nv7vFLwIgfSp6FtpsakUIvCYkM+GrxC6YaGQn76Kr63Zm8LtYrHc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806063532_1533537477397_0.5138026688722392"},"_hasShrinkwrap":false},"0.1.3-20180806075233":{"name":"@atomist/sdm-local","version":"0.1.3-20180806075233","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"0.3.2-20180803023653","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"eee63b3473292763e4fbc27f10eaea0bf9a2fa01","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories.\n\n```\n@atomist listen\n``` \n\nDeliver SDM\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806075233","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-bjLI7tS1nUVASjoqOAEyo/3YajGhnYI49lamUa71NRitAagQLh/QgPWoWokMViznPdz08I9cvV/iRmWmSO8LnQ==","shasum":"7027b599e376ea701a612a49958b21a8b2136b2a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806075233.tgz","fileCount":593,"unpackedSize":1398228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZ/7SCRA9TVsSAnZWagAAlW4P/3T6hpZ1zcED2SEcOqHE\nL8cTUVRScBdXDKufY5Gy1AsPWjzKkdKUGnY+2YWs9INICHHTLgAn/cuD7vz/\n3+yqRczRxEpFEAybseREzx42lRP+iGjpSgbIuc3FwKSvQSHKts2Czeckk2ag\nrpDQMw/jeA2AVr1odWhe4FuKNduRfUZwo3rdnxdBox3Q+9h6ZAIIPrt/tEuq\nA+BHKH15svLo6QPTDBApN/yji0AKa7P7/eUWl7ZJT/Ix0tFXncKGJPjOfDtc\nB7X/nBUTQDuNxHpAR0V73Ds96C5WRuux1Fb2gLU3xvlbdjcU2Ro/vpZ/zcJv\nowaZ3IBuNK8THEpod+BAbX5fHC1wqekBFrfhC9ZNGV2tPU5UwVXqyKzMNTBp\nPq+368drLHPRQZXFBBzImVm7Z3cTF/2RaJUxDY+e/oyt6DfyR+s/cs4YPKel\nkOmcLt2YhnpCRi7XYEtS6Rc6mWeLbMk04is99vufBQrqFZarDI1EvSTQjLqG\n3yD5Knh0El8fdRaUa5tgosaD8WxkhtYjLes6jFWYYF5IXziqRiaWcrubzd1E\namTeFUlm24geXBhsg0hYtJW5N1ur+ID7/PRwSy+k6U5PWWMAwOlGJ+aIgPE9\nItE8/YpV6jhyC8VlQCS/BX3KNv7U6eXVlIbhXjMHgZyPaa9AvK7KjE8eIaHA\n7uvi\r\n=BYm5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID+Vw7JbEgq60MomVb849M3CHfXM9sVwVS4z6OUOZ+LVAiEAsu2YGJZAi/XuGfZVG7r3Xdzp4Vinink579FamnMVhBw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806075233_1533542097505_0.5713605798311181"},"_hasShrinkwrap":false},"0.1.3-20180806075910":{"name":"@atomist/sdm-local","version":"0.1.3-20180806075910","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"efb1a562e88442653c65c6bdab9976a89f90ca8e","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories.\n\n```\n@atomist listen\n``` \n\nDeliver SDM\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, you need to:\n\n****\n\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806075910","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ddfYc4xY25ASIsOEk9kZuYwdxlgmGiQn2f8nllHduNbRb6UtjCAnMgT1X8JD0nuJ9rv7cD8fW9d38U1YxKNn2Q==","shasum":"ec6c7b564fc9de1b07d3aa70c19e81498f436b46","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806075910.tgz","fileCount":581,"unpackedSize":1390470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaAB4CRA9TVsSAnZWagAAs8MP/3l9jSqrteiH6UX4rxrZ\nB0cprELCTpXdOHc1KodQdu8Xjq78GuMp7OZ+TwVZHljRwAtvxX7ECoazUaz9\n0LpZVrOuREcKsa+MHoC4GHaXL5eTBkOkHPZIDGqpxAogDjLHKEmh7ThHwW2q\n6veWCX9vh5Ka7NYr2TJFNYX8qLTSCBaKEjh3fPyRK2rFniSGhkvqYdf7yCsr\nXqzLxCDv6IVqv3KXyAJtqbUyslp6URBDIQr4vGG6qqtkrY7MNVeTgIwlp3y9\nPxqlVZL1Pt74csXNtcvWNISErF0x2gvO2AFs0AZpnpJb0o5tHZgigICcCkWQ\n27AYF/nf5XmbQ6JX+ImUeJwXySJ4DjiB96mZLsftVUtGKeYA2Lpk6lQh069y\nq5fRRW1D2yFqHy/59Zop4pSP9GawdEVFQxjQWh/6bHuJ6BnPExmcG7zR4r2s\nO+swnFxtw2TPfqjuTAvKxyR2fbHiqeo6l3y0ZYH02sHll4HhKzc5aMLk7OC3\nt82psueWEcNiNh+zPyylFwvllMnFZDZ91Z+rPEKAW9luaimlj4Beft4LiEg3\ng1tJV4iW7Ej/jM0MX/jWj+gOU6qKlKkVBtUZk/BhGD6UgO3mKBPs4MKOAOuK\nTbkPMTDzRIqp+Qod+mbhY1ERNNiWzOoe8nVgRUS6G4kPamhoFq34wvTpbvIX\nnbll\r\n=J8OU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDY+xM76wOxXeG1KlYfM3+ucxZKJvjfe+R91rmNGZPoXwIhAN0o4SwHv4itSsdPh6ulmVFV/QqbEwi66n88jpVPpxRb"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806075910_1533542509598_0.8088866962329897"},"_hasShrinkwrap":false},"0.1.3-20180806122015":{"name":"@atomist/sdm-local","version":"0.1.3-20180806122015","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"abf13d3ba4798eaf3256972eb8de25a67667b0f4","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806122015","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8A9bCtS0rwwjRZE9cSA89J8OOEXB7+mRqmCiBGg1JdjVXaORnU4MizJnEytVz9WrYgyyFBFI3k8ci/CJIlCLpQ==","shasum":"857e4a356f80de40f69199a99f53af147e85dd6c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806122015.tgz","fileCount":587,"unpackedSize":1393746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaD2SCRA9TVsSAnZWagAAhgUP/2/t7/GkdwOATA6Qy7Dm\nEpv9mKBBdrWkv+MR5NtbIuZ1HJAY4j6YbvP+vY7fqVAAQvEaVgTxqGqbIi7B\nwaox/iC+SKofn0sgl0YhlwP6J6jKFkKq0VsVlbqNYYTz9Kh6/gJnh+6/Xzue\n27zXzEKUqPi8oF4HLcyNDWfr+sUsDBdoAJP1CKd3IX0RHpTk/9V9tq3eS1VA\n6e5WKG3CuFvkZuAvic0ZN6OToESksDk8+TjB+yduCDBOz0tj6AlFptY3tV7N\nmnPGnVr1uRw4wgglEQ3njF7Yfcj63VxWupq3BA430G7c9YVzRo5Vr7bUvxlr\nU06d3u6Fx6DUA054Oz4GsfAigH6J94it14PsStBmf5ms2FXAf2sfsX9KAJao\nxej2xm+i4M5h2KKhyZnubwL0+6j+QPsFNngWDijzycNDnHb/OqcHa6j+4fmd\nb2worKc8o2GD2oqJD+cObd3TZhlvSpKfR1MeJoX5EqQ4jEbSjssLXFJq1V3r\n1Meuq/j+OVgmouf8M2u0Wl/P5c0b2FeLEVTPV56p52vpDp6nSENNIWdZ3RE3\n9zPOx6KdKj8GlCC/ri4LYo+Y7FL0+hw/trs2el70PcvgeLywJfrvhbqQxZk+\nV+vsWHYiXuUzx56wNRgZjbiT4vxNd1uB1pesbrJ1k+aP551wo9oWterUSkX+\n6P2j\r\n=ClHf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH3dpInTxDChuovRVzQPuqE5uC7g22L0+ech8/KSY9bOAiAVds0nao+ulI1Wy/oKsp2fSwlT+KivZRHWDvgGk9u5bw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806122015_1533558162135_0.4853230502570818"},"_hasShrinkwrap":false},"0.1.3-20180806222435":{"name":"@atomist/sdm-local","version":"0.1.3-20180806222435","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"fdbc37689fcd0a53b8a1651bf96411e1020e1452","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806222435","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-K/IE+87dOLOv1cZDJAthZFHPIYhl7naF2dkahkXXoJXaKeQ/9m+bTe2KfBz5uh9EP6TZYqMH5yM3MLDphiTxaw==","shasum":"840d2c6489b86e671d77ef0e7c196498330b34ad","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806222435.tgz","fileCount":587,"unpackedSize":1398106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaMtHCRA9TVsSAnZWagAAPywP/0cIUmuFofmR8cWJ7sV3\nd33Rq9LJ1TKRPZ0oxyROx+CVQ6uFaJYsMed99PLE6R4IXQ9KDT6S7RCrrwmd\n/1akSeOsP9DGFPFjdeJg2afaQ4qv7f5RR/m1/G6UEANB/Fq+Fz9OFgz+llq5\nG/F3cNGlfhFaMMnK8DthSWuPtFVJCN39jYSZ4irrBNEy5cPGIhFExxKiXQAN\n4W8sBAJGO5ujrLtvHNr4HQUEiw/b52EMPgWP3wK6BpuhS2q9zd82/ouFxfTd\nSnkXlV7RAUTHVBlW3kLZSSrIZkcadj1SAmPMygFtO4F9q+IaAdFDLMCcIwUh\nssZRwo+klKGykRZmsZWUsRnkpRCNqZ7GcIqh2Vp3gHUwN/fL6MsWAuyTQAG5\n0+Z/v/FTUYnb8KsoLMNNBwplipTFY5xDao/RGvsq2ptmlc0A4T5UG2MXPPKA\nmH9D0/WmOuq2nD4bEphenwyVgz/yAoU/6pPIugov3X+0Px9EGiGM4vd4mTmt\nOAhb2uWSfAvMbUGLaKOnPwZuTTj6dTgPY2rAXxHT86/Y8Hc5HKhgfZIX4kk+\ndukZTTo7KWk6egY+0MCWXy8KmcK6Y9qVocvjdyjW6vQoMw3lngj/UYAgZu5e\njXAQ8UzVjTT7mUHZAMTyULIpMQAWqRLj16AyrR7HHwwEA1jA5W8ImZIhuR40\nRj3R\r\n=Bx4T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpyHfLZwxL8Vg4nRmp1CKYfbWDM6sFWjVbc9UVHooEkwIgIdze/cVDJJdbryx8dWr9px1nCPcNYStWKnyLhyl36CY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806222435_1533594438435_0.039175389189611165"},"_hasShrinkwrap":false},"0.1.3-20180806225005":{"name":"@atomist/sdm-local","version":"0.1.3-20180806225005","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"2c50528974f48a57d8f16954693bf6bfe91ae475","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806225005","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-erzIKwjfI4E6tLkOMvErjuY7xO8Y1/cG6HaE8Qwdu1Grwv7/iHa2Fi/xRg6yIkTQsKC3SzFRs3GSJbgfVWvAwA==","shasum":"b13f592fad1db7a6e434e8771fe25e29736d2fdb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806225005.tgz","fileCount":599,"unpackedSize":1406102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaNFUCRA9TVsSAnZWagAA/KQQAJOD8x6p5Wh5yiPQSY1x\nkrvqKFNeiOOm90hqdbAkHJ5/dWs1mW07oli1l8OcGrsuaYdvkLh06aeQt3Ms\nfI8mIO9FwrTWn78QRnRn5+dXYFDKXo+Ya6hxEtuMqBHehx8tqposVNxt8Ar9\n5C18kNrwml5DlcTW7lfmZcdpoFwkaO1Ya4qc7cH46yGOKia5wLFSkGGquoQ7\nw0B+pI9kmFshbUACDujJ/gPDUgfNrs223XypSkT3CKQOItsxiy2yeC0ETnLR\n74kDaYoteXAm0GDrU6C7LSKtBMATEGcKh9F8iMyoYpByYDLnN5QhL6Aez0vS\n+JQZ7+rTfarla2USokGaQGNa1GfDyBfgd1Lgakm23jYuwfk0/KaJY+wKGTsy\n9uaX5fM2NDVDvkAzRyOQohNj2tDmV5lkvQG6MCXeJ+GNbwlGGNoeATVnnt5Q\nsjxJlxKIpS1hJkzLWuZC6CUwD3p00L0x5AkVomFEhaSGwTq+2gbs8tQJKYkc\nBYI5vAXTN3p3lVuggCKWfz0YMeo+9QK/RWNv5Au73tE9RZ1ECV7u2MOk0WcG\nPdUqcfpIshkDkuHHRLsk0KqY4SMIYpdzGtLxyJnXOSPFLmrlifUSR57xz4rv\nbLM2dEyD/u+ghmoEqudK71WUnkIydttfGqC3JVseqRC9ExbVoGpLrkIich+K\nDaWq\r\n=a433\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFrhNForZT8RRWYaEWNLd2lzCYCcAFYsnbKi0n660qKYAiEAmfeCHBGEXqRHd0gj4RKLhQj0B0JG4oTN73DU5d4a/8U="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806225005_1533595988202_0.5622741940141014"},"_hasShrinkwrap":false},"0.1.3-20180806225312":{"name":"@atomist/sdm-local","version":"0.1.3-20180806225312","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"6981aeff5f9d9fb08fac42b72dc300f510155af2","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806225312","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8o0BzcKk6BPfV2UW7HcsXbP24wRUn/MfSLhbk63B33CzUhRrDxJKG/7nrVEfXBG8jNAM61bGm+FTPgPyf5By6Q==","shasum":"8a2cb76aeeba486e389c4d81448e751c789bf9ac","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806225312.tgz","fileCount":599,"unpackedSize":1405822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaNHeCRA9TVsSAnZWagAAScMQAIUBz+B79Twnt/ZPTFUz\nYbULX/chkKvdfAm+4/CJkei5NDV2AQ++S04pXGz4LyMvuudR+IIp0933T7gk\n7TzMeo0LDFKwYIs4qZ0WcdfN7WVaamYNS86ZQDWAPPN/LKo4+6XRTht4LDHy\nKbJGR67H6DTZNfsueXjbhSTMZogv9KHusBjxMuFTNFidHTjeB+8MfE8Xe2H6\ntsCb5kvr2vPP3uFioItw2smMLS3zl7N1qCxHekUsPQ4UxXm8v2bHCsgzTeHa\nIynOdOhSsxOO9grzmhMS6Ws9OufgP5UnP0UC9WHdkOIvp6WW9lx3bRyoPzRE\nLhV5mPNmcjhKXSE+GhDjG/Fpa0ocLt9MUvpLf9Dl63diuBBgLbMulQkRjKX+\nnDO8bKdGQz9QZ3HlC2UdkVx53tEtW12N5az5SJWQmwY6U8ZsRwY/A85+Q3AF\niVQ++K8b7oKkmPh7Y1yGJPC6K7yGaBcEF6GUvvBPZ5DUhzgBgYq9uz+Lh9XR\nt0o701DTFRI4oJXM0k/5sqkJ9Lv1FswPIRlRWd+sgeqUsW7M+H7nt2MrWTEL\n47JydNt8V7U0m9WFCcKuxeqGEuVjmL0gMlckv2CYacuJ2Ui8hd1KNR6ysCl/\nlLvlHbowbHkaexGbWGC0P0lMk4D13Pc/OplsqEOulBWZhPPMRAmxX/HzYt5r\n7nJI\r\n=WMYf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4F1KekkU+sm/+WSP4viYPwe7xtbifTFnKPYH2/EceNQIhALtACE0KQ0gnH/cWzI62eIcd/bvW6Ol0HMtatXUbilnh"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806225312_1533596126401_0.9798062349395102"},"_hasShrinkwrap":false},"0.1.3-20180806225219":{"name":"@atomist/sdm-local","version":"0.1.3-20180806225219","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"84537666fb54b3f737dcb2be100842d258d8ad1b","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180806225219","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Z3ltRajxO+YkuybwwVRAGyttlsZ9LjM4E9LWpnEODsGx5GKOBb8jljbZjqMusiCdfB+RINsdFHld8jIkv1Oqzg==","shasum":"8564fc15bc2f76d39c1d9169549c8209c0180bf5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180806225219.tgz","fileCount":599,"unpackedSize":1406112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaNQBCRA9TVsSAnZWagAAuV8P/A9z7InAU/QIpIkaV0oz\nQONZocdZ1gkV3fmhGnfPCQtF+FXENd5ldGqHUV5TOkIW3nxj4DSUN/m9Ffk7\nmgLHHlX6fGUyfEm2KfPSmq3UOMakw+xMv2LTc7Wb+2T7U0jYTHNL/wzYrFv2\nSC75WzaB6kmKWom0lFOOY0tGgIcwUVYGR/PbgJvvYI1+fjAEJCivrw1/VbEy\ntuOG/TV9P5mXebm5N24Ob5n6th4qVKcriBc4UkZVDSzM/5YcUNBb/wktfgHI\nmjlgIT/mfBFn4LzF3IG4kN+c0qpveH7q7lBG5RaN96ZZZHpGlSW7Px8djyfa\nd/oQXTvHvvlAHkUwUHHhPaopecoAXhvBjoqIBqpLVSUqiAywk+x6HXXcq0aa\nFicMz/ARcSyeQHsB+Izu01/PU/QqQvXZb9peqri3e28jKZQ0fP1sevGsJ8KF\n2SsE7FPUlFm9m4qI5q5QMgvzo2fNaHKcah/i2h/8Yz577u9L/SDNj6738eyd\n7NXHKwqX/gBf+KAh4RjZIMUTmDS0JzCu8rTSAf3KuL5NsTMU5HVQ/9OcJgUK\n8f/FluS2h30gHgR0xTSHh31pxmnjb77bEBLTJ1049CtuKqw6hu92P1cS8kp8\nK6vOOAGXiHX9xtJh4DRYeIdDhAa5f77kzA434DjhRyFm1CJUcJ4zIsyj5WjR\n+LUT\r\n=6C7l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLBkL7ELXnHx7NuiuoqY+LpqxEa9F0YpBsa6Aa/0s2rgIgBh9eY01qX+VKXXpdBQAbc753CxjK+GtB+FBrqrXOjOI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180806225219_1533596672789_0.2318122725334133"},"_hasShrinkwrap":false},"0.1.3-20180807010421":{"name":"@atomist/sdm-local","version":"0.1.3-20180807010421","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"140f0ad162a239fc2d8cb4ae3fe50ec4c8aadbcd","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807010421","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-WID6cF6vRkAXYqDT++fdinZsltiW0XSAinuQrguYYFsMNtWb/t0AvUq7QPdi20ELWYiMcRum0XLAFMzLWygoDA==","shasum":"93ec02c12dbda5a8d36460511c650e4afd5acc1a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807010421.tgz","fileCount":599,"unpackedSize":1407805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaPCTCRA9TVsSAnZWagAAbJcQAI0MOaDJaloN+MHqTO7v\nuDAEKAufvlN770N3bBZQHamlSj65rF+uNkW3DsqhR3PwfmT+EuwmNkyrBrHk\n8yDeJAloaSf/j9fSZljrhilRsxLdQn/nwg4hpJWBI6muC2/xjkMeP88t2cvm\ngOUXumXkYJ8pWUWbTF+SnyJ9k0hhvwT42LifZhUbSSFn25VFXd/VWR63kBXU\ncigUn9gG5I825HojKfmYcXEsQRtieiNhZcHXfkUJqjSIKOJkjBlWqhIqBsgZ\nrkTd/snIOs5/lvXUtpxZCOzTjS817AJX7Yk9cdGbHG0ZohuiHAyzQ21mXcin\n31ja7rItQgC6a1xVGe+tysq+Ef+dXvQwvBim4f0figRL9ctkn+u2eYaaY6SU\nRFKCQd6PIY8gL3AAwo5SFcVcQw1yUNUwWcswO8Q/c+V6LqTFu0m8qIefAgcF\n55Z9eEQuzUktHhp/dpKu/1sDVE1xGmHWvGdQSpYZtOCGq7mG9UwH3oCrySPd\nkRoD/A9pn8gf8/PV9jZO89UuVF3jCesLv6UN0iTmfyiRIX/SyBdqAR3EN404\nC1gu+P0xI/dsQwpNdeAExsVIAoRPm0+riCNv6LKUBVYLWhCtgi1XHQXgkBfv\nyYWIabimIW0k1iJ33D5QhUuThjnUMYyZjFDFIG8+rHkyxE2RsXc8sS4gaD+E\n5aef\r\n=gCVF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDChEkxxlmW3ZMbAAcRpscC67dcb3CrP+/1sFuytiqrIgIhAMjaYTtpvdhl+d5DC2fBqhjGXevRNYhCqT0OHgkHaN1D"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807010421_1533603986452_0.7303554140084181"},"_hasShrinkwrap":false},"0.1.3-20180807013120":{"name":"@atomist/sdm-local","version":"0.1.3-20180807013120","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@types/inquirer":"0.0.42","@types/node-notifier":"0.0.28","app-root-path":"^2.0.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.109","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"591977e42dfb5650492564c27e5f2a3f1d267c55","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807013120","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-GtXo4J357u2v5AGlQL2xoGIfnzEIQLpb5ntAHdqg2CIlnfxO43GiH8Jr99ziYes5t6cAYMYqPvByBDG5tso7Gg==","shasum":"a2969cedb33d5ef98f8bfa45648a4c85cdab48e8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807013120.tgz","fileCount":599,"unpackedSize":1409433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaPbvCRA9TVsSAnZWagAAWhUP/RHRh7otkHPIdzMDNbUS\nNvyzQNrpiN/w8olJOT1INn8Mz+61PKALjm6aJzEnaH0L02+tl5+ZTqe4lriC\nEQyepXU/rq/XTkZEotePi0QXTxhQenqmmqmMNrCUhUlBg/5MhImHDhozKN62\npfgcaKcCJTrFLrFSEZd8i6vswkoPSxQeZJaQlp4GS4aPi7Ty5mH3zRT7wv1T\nCw/EqL8ALkKno1eIS1NzvdbiY9FJNiurqwjAs1pmIqSosRyXb0PItaUxAIdj\nNRVEydlVw7P69t5PQPp+gXwgWBagofPEfGwyCY7O6WSrd2Fbz59DyY7SIGNU\niKae4XfHdPq/TIsW5wXlbbKqRhDQ3vLO5w3vLtacHEl0RjxBq86XQFgzI2Fp\nfmc3kc738FwxKBVF+x4V7WSoozZR/QkYAFZuUNxnEpg3C1bWhTOuMmK3Qfk+\n25MzI5o4rHQ6Zz6nawwnRVENlW3jNsrF+YxzkeEODD2EYhOUmGJvuAiRa5i3\n+xD9Yp44de2AINklHsddigUVBvvAtmEjdeN9J/AFCRPWDiqC8R64NhZ6Ch6q\nt/E/59a7gqPn3EBQ48u2mNrKEPASUXpnT+3W+/GxMYZI3Q7QolUngUnPS34T\nIWZGgTCtjPMiQeYjYE3qpV2W77IltrPq4/9K2Hd9PDD2AMMzV3LxWzbTfNkg\n3piH\r\n=jmDQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFkPBfUs00yfTyANzVdbY2R+3aV/HlGrR3tSj6gbIkm8AiEA7kGsNg8KYLrI7NHq1P34CSegbzXxxsLIw1U4FbIAu2Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807013120_1533605614701_0.5861279015978882"},"_hasShrinkwrap":false},"0.1.3-20180807014030":{"name":"@atomist/sdm-local","version":"0.1.3-20180807014030","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/chalk":"^2.2.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"0.19.5-nortissej.report-editing-errors.20180803211622","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"5340373cb15457998ac87604549959fce9f6ea73","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807014030","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ZczqQVOLVxdOUywsqaHmcTFTUn2Z+5La3Z8vTyf+9POhMKrfCAlbTkf+m+XjTm22LAV0aqXQj8F4/ORiOEvFig==","shasum":"b6b748ad5493458ebd889fee0e3ddb2a79c18703","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807014030.tgz","fileCount":599,"unpackedSize":1413860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaPkFCRA9TVsSAnZWagAAMnAQAICleOu9mGI/l8onnDVO\nc3l5P+nRZBE22Pu7wj9UtpiXaQsqkL1I1QG/jwEu/x5o6LT+2Kh0ZDsgS528\nQJfuhN85W0j0JDuSHVLLkiZ3OZI0u6mbxbE2EWR7jTuZAVsATruwg21pgrRW\notmzq/Zq7JvIjYK138P/IJwmrGyg3r+6koqgOnqeXV82idussvncEBUgPH2D\nt3R08HjYjP08CQYiPseGSKRK8jzASS8Jh/+0iML9A161AFar02yjarpxpf1Z\nw6BF20wzhpjcYcgi32+Q+BrAbgbeNrh7ZQ8rrM+bnOuE9b2tpej2F0Sf5xYP\nP20NN+xTnnZl/wJnFDww5HujvF/r3vx3dWAU6JBUz6jtR55SPt+LZY2LGyGn\nnLyKRkih+1GM5Hh8j3uPU6cTSbyKzqXgSG/vXLPX+qd710qfXKTybgpYjqF8\n/doV5baTFBzoPR6kCK9gdX7jmg8cHt5Go2WZgpffGfpINsdiGPHpNreZ4ocC\nqqzMdla6f7kVXLOgdju2TGX11H79sM0IvncJOjonxMfe4zY690689Ti59it8\nC+yrFoLDKFkJl+PpseHm/BT8ubNXHYwW56SxG8TCkk9/RoFWm05BvfDxys+c\n3/8CZxqZOEEtX4569uZ6uGG1eHo2h2bFsLkMRYjf85XKCjGuoGU0T2ve4tfH\nVNpr\r\n=gG4S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF7uAroYRzsKvx1+5vomfTct8Xgy3wEXTI5oLEDz732fAiBumU7GUueo9xlBZklFycv9UBdqzh1jXaCEv7fMlE1XIg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807014030_1533606148961_0.16169182166443963"},"_hasShrinkwrap":false},"0.1.3-20180807021711":{"name":"@atomist/sdm-local","version":"0.1.3-20180807021711","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/chalk":"^2.2.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-nortissej.report-editing-errors.20180803213716","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"8e3b5f599e320b68dcaff1c550f052076c89421b","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807021711","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Let4/SBAsnYZEIYEu7NJuzbODn/4kgZdpNfpSm9KSIRdYJgcl9zw8UgVX07hw6aJBY3znyEcpg4eANinWUvAbg==","shasum":"bcf70b153aab2d682147c4cdfe8b85b60224b615","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807021711.tgz","fileCount":599,"unpackedSize":1413861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaQGpCRA9TVsSAnZWagAAcnsP/iff6+4UgYZs+l1viCDu\n/d8aa3RzMo+f26/0RhoYEIjhNQWrEBaOge1exEoDBLZkts6eWqDSxwLHruNI\ni7/7DFVHv3jh2MQ523PrAGDB4jUA+Ux9uGzy/gOXd+f0NPL82fpUTjgXioz8\nFEtSpa+HEpvifj93g+rlKsIqh++zGYXskrf3ebCq2zqyOGXVpaY6UOYTx2+g\ny9JUWE1O12Wmj+8/F2xrTAtt6cXoKKkDRLXglnKDW0pyjrivE2oSuc3PcfCO\nitLYzY+ZguiaQKeK78I7fryP5LW3WMl7sJweUcjwd57xVSiLO4AeccEpDpLh\nJ1ZnoMC07mfjk4Sj7sYNG79C9HY38yLosZf7o2HVIIOwdx+Wv40o8MMdyshd\nqkMT5ok+FBrdvkZAxKixlsSQYqtwdzaz26ulOOG2ie/oZIIIfZX2/SaEuoYN\nA5CL7elsNLs9hzQ9wMP09DdNdGGQqJnROIoxuRa1iorakXrjKiwnp2eZGYbv\n8feMjvZro+whsxxUj9OM+TtP7tE1iWwNRxIGQt8FSyaJARexRbYex/x3dce5\nBPgJyIHVHFJYINOwrJNqPeYhcGeg/yA23bQ6WBhJpbUIEDZlJan401AYbjn8\nyVU8OahMwmGqlBmSHi829CmvlxacfycEH+E7waVYgJk26vxJ+KMLLPbFbr1f\n8+E0\r\n=ch2q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdH+ItLvnJsrxL++0uK6tXPpADEOyfGWCe83B3+n7xaAiEA+ZBXMc+EtQsCURLTBxtItS4UaUzwyZ33Ni/vwC81s1k="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807021711_1533608360627_0.08114182134322423"},"_hasShrinkwrap":false},"0.1.3-20180807023031":{"name":"@atomist/sdm-local","version":"0.1.3-20180807023031","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/chalk":"^2.2.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"0.3.2-20180801121109","@atomist/sdm-core":"https://r.atomist.com/2271969078","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"c196901e70d5502f8707eec6940594470e7bf309","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807023031","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-r/5OMT+FLozS8pr4a000sKkt1vsd1TAQKvwLfWOGijndywJxkNxepvgxJiBUnfWHmeoisLuDjYbUd9mkdW1rIg==","shasum":"8e30389bbbad5d7e73134e23b50db03e96861327","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807023031.tgz","fileCount":599,"unpackedSize":1413829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaQTlCRA9TVsSAnZWagAAvHcP/0AdQM5fQ1TcDGAJ838Y\nyN6Ie4UQcz+WcUQCVeEI1dFotjiSM1jaWHz94NsnlDQwiCB/L94F/F80ss42\nKbwdeUvr6/3ZvhKGWPHmheof525A4v/9vS87HfVIVa21Ew7IDUyh4WbzaDJT\nupAKg+qCEi5vrYR4tnpxPX1ejVMcpDxH2WswI8pY8hRyGQkJjzEdQK+XE2G4\ntP/cgciW8PnubRxo1jnowIYgkaspaklDP6pBd5nwCKoqZxZ1SXKxRT3LLgEw\n5NJjdMNug1mUegcvwGqrTh9gJ8jZMCx1KuwgdbhZeXNfj5BiLFBuzSqXnBUq\n/1wekFe5y0Id66DmR1M4xNtCQtNuRsUgInVQEyYSKVK++BWu+F3egqZ9Oh/1\n2H8TjEdix5xoO3wICrSvepwWS6BaFc9wT7G5cNExFpyr/mLO5KrGl+FaixPU\nVCMwA6qKFNrWDpsyQ+H6qJbQeyz51dRYJKVvCBR2ZHVJD5nkRTNAWu+LO+rp\ni8Rznn5hYV5fb+G6Lb6p5LHkoG2qftVqAn4n4x3usopWKBAqnqDFvvHOVwZn\n70b59ATFYuJFSYaJf06jXexeE6TtmMpMRdz5NLyvskPqLBKXkxWl1reIpfiK\nYKc2dgOfB4OhuBMLwGzOT2WgFFo2lqLyqMo9dsm+t0aHGE4tdEbNoZxw5Bps\nRlHh\r\n=paZb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDtUMm1vDNGNe+0WlElc4d9ncJrWHE2JD1+gDO2tYbQlAiA5U7UFrxOo+VQ73aLfzNddEzenOHkdTbI2kVE6yDtfxg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807023031_1533609188925_0.3326093803526622"},"_hasShrinkwrap":false},"0.1.3-20180807031509":{"name":"@atomist/sdm-local","version":"0.1.3-20180807031509","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"^0.4.0-20180807022858","@atomist/sdm-core":"https://registry.npmjs.org/@atomist/sdm-core/-/@atomist/sdm-core-0.4.0-20180807030718.tgz","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"b744e8d489a32e9a3c8f659c2c1838820246ae8a","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807031509","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-g/d6gPGDBnqdOJbigtZoJcXiBElF6syuUGYMcezC+BEoA4h+LZYO52wf9nAFPW8g8RgqiLvgq3PajXDObd3yRg==","shasum":"abfb54dcec87f14a80a90852929b755a1c1f66e8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807031509.tgz","fileCount":599,"unpackedSize":1413766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaQ89CRA9TVsSAnZWagAANLoQAJs8aslMtC+uJM+yO0nP\n4eArVmbbXQh2TOe7Kr35Dzs0Ch9gfjDQc9DxKrMfJb8IqNn0ZC9jkQjD752Y\nqKJ6kDHfjDhJXXMSjqjBy4iURkJz2KjZS8dwa/THHlBvAqNu7RiiffVSKbNN\nxz/nQPTCiZVSgRWGRZ2AhfhsZCcsAC40/011jrgXwkQq2EKAIJemY/pZO8Kk\nmWCmyL0ykRua9ltPK4HHbgNgBI8d2+Fb+XRy+pGxJBzfuX2BzAYlPLsjRK7i\nPXSz05F3HJ22c1c75gGgYpTmcB2ckP+4MxZWSzmdgRIFLoqfzOpaz4nx6IR5\nmXGEmTPC+Rliu6McVEU5ofDZ+WPnxrycLg9U65C88+kP9+wkrivREZkx2LeJ\nyDbSMT1ENsfXDRpvjhxrn5S8rjZfzbKnK1uDRRdLuJ3+KzFaap6T5CJxe3OL\nWDKLPrQuW279fpb5jX4LleCl0PxHCMftdwEiDOQkXyThCdqVntoVSIscMy8R\n7iKP9Maxl99pxetXs58Z3hLtEuugkwd4epSiTI9aC0Yuuye9S9B1wokQPhcO\nzyf7lKA/ID5WFW9bnFK7JYwO7IGqWb1oAclY937NKxZOws3muw0KSKY5xejZ\nmH4obKhwh6ErCM6MPxynVB8oTUZUxOktxLC7SDfbJF6aNZyr5w2GvfXtkduW\nvYt5\r\n=qpfw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9rAAHJhoj20wm/RPXMMJskbdBiOx5pWmOgDkDpJIMNAIgWcwyh4LFkkeg1VrgSRW2xQuleyaclBOrZOLQt/UX3qQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807031509_1533611836823_0.5793845358130134"},"_hasShrinkwrap":false},"0.1.3-20180807034606":{"name":"@atomist/sdm-local","version":"0.1.3-20180807034606","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"bin":{"slalom":"./build/src/cli/entry/slalom.js","@atomist":"./build/src/cli/entry/slalom.js"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"^0.4.0-20180807022858","@atomist/sdm-core":"https://registry.npmjs.org/@atomist/sdm-core/-/@atomist/sdm-core-0.4.0-20180807030718.tgz","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"9789f2b7d2955d1cc2e8c736d096e0410a7efa8c","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807034606","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-VB6pDIeN61GRiXSc3NVPDnqkfD2wb9MDiAgkqJ9zF4mc6OG0odbs3zmbDcq5bOfEnhbs2F0BgR5palahiONUzw==","shasum":"dd2d08829ea99ed1c532deade6b253c4acdf853f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807034606.tgz","fileCount":599,"unpackedSize":1414668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaRabCRA9TVsSAnZWagAAKywQAJ00q2TnNT1h4+mJgnUL\njv8OMtzIFzGu2bav8QQmAyoesSWdpQXE5ksfyqIHXPlMLqzWwcBBWMcTRkB3\n4YiKx0gCHRjjiRvNviC3yJx1IM4HIV3q6gKXoLNQRBy7PuE4UaonH4QiVvzH\nfRx1ViZ1XHiqLry9qikbOTqH+SOeNWnF75yUI8eY4rU3yVrf69+uA9cVNPCX\nMqLNfleglFNRejJGZ/kQjWRtSNcEN0aLJqmJicSgw5iaGlCvfkp34/tnVa6B\nLEB2V7RR+HH6uSV5eF1fgbxcnciKXt0wHmqPOelUkAgw0AUGxb1FkwRUVHnX\n0SYc6OKkbUiy8wXUqZiRkwjd3FLyfsPuWmK9lhg6EIq8x5Ol2vPleZV7CpDB\niM9Th7lRwUXxjCXCjmUKuI2vphk3QyDebX035N+xdb3im5OMivO4PV1PURTR\nmM/eyQ8x/w8zGFXr76FGWrN39JownQo+6VdsWON4n0ko5bXA+4loHMOWpBjw\neiN5ZYTZyplqxATS/IvBiIk1u+jDiZClmxAFzrbXZMY10XiE1VPKqNlUKZyp\nPsqfPR4H5K0e87YvazNIW/KypD60Y/UFcx5GwNVOYGKj8nYdL/Ma7RXfik8t\nWJ9W39Ezr5JJDpKTFyb+ZS1b2b+rnoKtg/oy57AuVtuqCI7hrpgwGbeuLdES\nhGRY\r\n=NzxF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6VH4F0smLNzAoRsj5eEfCWpfTbTVAjMpEY21hE5EssAIgIbx7Y/tUppMiDbXRTuV1rv6cwNtaHyUAMXpQVex+DyA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807034606_1533613723067_0.025583128399569333"},"_hasShrinkwrap":false},"0.1.3-20180807054135":{"name":"@atomist/sdm-local","version":"0.1.3-20180807054135","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"^0.4.0-20180807022858","@atomist/sdm-core":"https://registry.npmjs.org/@atomist/sdm-core/-/@atomist/sdm-core-0.4.0-20180807030718.tgz","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"1f47668ed6822391f113dd55ec2502df8f1077bd","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807054135","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-IdgfNy97EBC8tcVr0BhuayL+i99QnbKEysDZ+Iz6DB9gUPabDmXjx1RA7/Y0eLP8CnqXwt91LFsYgJi1h//iSw==","shasum":"dfe4f96e81fc7b1b20e2db8a0414d65ebafd1532","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807054135.tgz","fileCount":598,"unpackedSize":1415552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaTGgCRA9TVsSAnZWagAAD5MP/AjonxrrcJi4qWNgKyK9\nwJ0Vy6ugfgbb2ur9B79eZyzplkpNh5temGsmGbb4tksCZYhOLUIU7l2rNYWM\nfzkAbx93c8KwUIz+G3XiHw4z6UxL2O/e/h6v6Ty9bS/oxQs0523916YHmu7N\n+oo4TFxLEeh5yc7PQn0terRJ6Ou9Jlhz+BmtpIkxjG0/9WSy3NeKBsueQuyC\n6Hkz2cjb1xsSF2b715O5iupyAhe5CqyGT83Q+j0B5xJeXJ05OAUMFXURzUjY\nAuMsnbDgRVJktuMQB1mgAJPfe2qJvch0q7GwoFGNRdL3iAkbsPNuEe+Kql6B\n5MXyi0Yg7hrPWgvbFuUa0VJg6J6MswMjkd556faytcvqZDPiJwbqGJGh3YCt\nR3jyMUpLu18e8rZbpsYOAzfPhaLjT7wSdl++kNysZ2+nMRMScS1VE3p9NtRA\nwTPdrkGo3Q12jP7AxsI3VmWCEVqLnHl319Bha3Riwm09LBlez049tGRu8GKc\nrltCxmguvEdHe0+hoWPZt3imrpLXpo1+qVdR6O89W0fB2YIUb00Rox3MVWp6\nX54nwIyaeIQzVM6PRNU/folY8IGTm94EPELjNtOFE2YhfQ6Ot8doluxEYcKh\nUe2TVZTkJVmqqLXCEGXpzLUNUa5VWPlUm/twgLQGWmka1ZWVa92zqBR6xeYY\nizUg\r\n=+Onv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+RU5dRjEdbsE/vpZoYkDQ1PTAQ9tOnOs7++v2/ueeIAiEAyLG1u/w0Wx6tbpxEur1mGXOEZog25Bt2LYjKH8YuS74="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807054135_1533620639621_0.8515673297869462"},"_hasShrinkwrap":false},"0.1.3-20180807072357":{"name":"@atomist/sdm-local","version":"0.1.3-20180807072357","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"^0.4.0-20180807022858","@atomist/sdm-core":"https://registry.npmjs.org/@atomist/sdm-core/-/@atomist/sdm-core-0.4.0-20180807030718.tgz","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"55bcf5595b85102181aad4273603de5d374eb609","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807072357","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-eRt6JLebcY12yWgORg5rxT/LUGOxlFsBZqxAJsm7Cpx3xi/WNB6OWrXQhuPgPvkPV0I+xINmmavoU9skQ686CQ==","shasum":"8cae3ee1653d66338efceae3cc01d4ccbe581696","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807072357.tgz","fileCount":598,"unpackedSize":1415493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaUmvCRA9TVsSAnZWagAAnwAQAJCFwj4hcl3mce6hqm9y\nCJfwcgWDXwTvMJUH6y8LMKZX+qvIlsZxdUtjH0jjF9tV0ciZiG5BLK1LF0rP\ngeBHdgqCnQVDnfUdcH+FacLiLB+SJObphKU9Q/8LGzXHJCsvLz+kglGNUImL\nYLiu8DUhawSFjDcNog0c8moQHKYfE84iur73l9UfwM9VGnbNvR7lLeRe/tm4\n1xzib833UiMaBROdPhfhcsRBM5O/mkOMKA3KRr+GAZCalplF9iSlSPF7J2mg\nW+EGBWWdl2UEckgwKca7rylXZ32chGTvUV4oBeWsNf3l1Twyh7uebzoeulKN\nAhqvNgkj5Z3Op1Cl+ION4cr2LLpIn6OBaD2sQmc/R0hLnrVJhWsCRz5Ez+CQ\nw+wSRX7lnCh6kjXvpsLMU7srRLPCU65xg6K2vsm7ACk7vvlxzKC5t2LZB+zy\nkvxzK+8H3k1YrAGIZKsLk2FJ4XJdwAhVie4KbqwLTJlKAoutd2CaALQZuVn9\n/k/5fg+dfyOjfdjTxqwCDvcRLy82KrJlfSZxq58Pdhu1xHei14swDLj6HE+B\noyKmjMGgol3QfugK92pcbmaI1CFykIwVeto3CBRQp2V5z5J9/j/Vvv5iqU6l\nBqefRjSDmEhVxmbCVL1P4rGRenpLO40Ssxmq7LdQQRi5TFvFMJXvsB1+FXuj\n9BY7\r\n=OGoq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEJ8ic3Tv/inzSJ/BvQXvJVtBHb2FqRYwehxvI3vciKvAiEA53Smk0GCbyometWGonDg4enw7Ze/3TvEiH6RkMDQM8Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807072357_1533626798733_0.21957738437607288"},"_hasShrinkwrap":false},"0.1.3-20180807075658":{"name":"@atomist/sdm-local","version":"0.1.3-20180807075658","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"^0.4.0-20180807022858","@atomist/sdm-core":"https://registry.npmjs.org/@atomist/sdm-core/-/@atomist/sdm-core-0.4.0-20180807030718.tgz","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"030eef39d2a735ee209898836027e24597d723ec","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807075658","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-zWm0QOBids7yLCoumTx/hWUizkBXm4qu7If1MOlZSQgv59OfCtrwBFfqVQXbnVlIOEFWp9FEOUXUdMEQNqVGkg==","shasum":"efc74f45a62155826fd1c0e29dc7b4c163e4ac11","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807075658.tgz","fileCount":604,"unpackedSize":1422065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaVFmCRA9TVsSAnZWagAAxlIP/iYGXjMm4dOIUePqP4hl\nkNveAleLdtqmFxXB3AT/Vmvvh+G3CvbmzoW/BFbUEFwOQ5DF+rPudGnYfewR\nrGIrg+EQEwO3T+J0cLw7LTUwk6Xm9Db+ZMsx1JPPrypAvKfaKAfoyBchGXmh\nX6K/wag5hRNdQaGxRJSScEqTO8SRX9SBl56hR3Ha6fC+9Vv45SIMlTbyaxAq\nenu33Bv/ZNonL91yhr5eLfq2cV0vtYsXsn8q+BDXE7DGbX/hgW864vvIvL1P\nhtslNODAh/xvsekQX/DAYUWCJfki/R+EKJakh55Z6q00/7jUKThlfB9djZn2\nxOXG2j+pYVAEYJbRyZRtTpcJX08ROX6iliSgqCDOeZHdvMGk8PZLhDLbZzBI\nPp42+Jsvc+lyq6C9JXWpJD2ELyeDJde8iBVVYl9egQs8bdCEq6H/IQL0rZzP\n9aNZqpxqAnCgFUp66BiIEkzWCicyor0Hi1UC9UN2OqVemsR9eRQuL16FwPzy\nanfuvuYwncxTrbBqDm8ee4zZe68/xAOXapRu1yxArlz6H3Olfdt1cTREIoL2\njQJwVpFzGPYM3qZKAIasC4afLtlvelcypR/2tSg4ap02ZXAu1w8DfyV/08ic\nLD6NzM/n8cqMQROZZnnRnx/YXOF+0QcASTApfKJB5gxO92Za+n0MfXuowZkj\nUtAD\r\n=7jwk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaBwbqpYqIzpjJhpb8omBdcDWPy9+d5xWVyJNoGntJ2gIgCaSNAk5EGKeTL4o0yPeLwu/vyKYI1iBVe519UafdmqM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807075658_1533628773509_0.7352858135410267"},"_hasShrinkwrap":false},"0.1.3-20180807092255":{"name":"@atomist/sdm-local","version":"0.1.3-20180807092255","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"https://r.atomist.com/1868063601","@atomist/sdm-core":"https://registry.npmjs.org/@atomist/sdm-core/-/@atomist/sdm-core-0.4.0-20180807030718.tgz","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"5db4f196b4e70b963f7b18ac7845a38eb1093224","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807092255","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-bb06jqLyTYdISnQQJ/sAejSwai6i/fq81Inrcqy+a3RSxUHWWcLPYHbG8SG+hc9Wfk9Vdhj0aWOOYRWV4SMLjQ==","shasum":"33653dae724a41259c67f5c5467ed8a514d25797","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807092255.tgz","fileCount":610,"unpackedSize":1430204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaWWXCRA9TVsSAnZWagAAqNwP+gNU9BUgch0wXsd8usI5\nxUqNIDfCZU7XfDVWprfe71O4lHUHZp/WE0P+n8NW+gzWfgUVkRYYPBsa4NFP\nXAzYT/BGsGsgJcqeMQ1MsC8V590L6WzsNG/4dzUQwX4GXRm/YnTgG64sobBC\nfYYEdMyOwJNGukKWIyB7jXy8a79OykL2GFZcQICufyP8ES984c8/guLdzQ4i\ntQjJl3stpqwGxxuq71k8ccLdLeY71ToD/cTl/5C8potShmqIGWBrlmjuj2P/\ncL39cz13jsG3DLaMKWOxxioFlUWqCVXkV5FhAYf9xaijV1NPxLRizdxOuYMP\nfsElvxQ7eVLo6Zh6bJ+ob5BVVnxdlrU+cdNMcag+bRPUJDc3jgRe9OW5uteN\nxuJcVImEPRdu0l7JLo+y4Rg9+vce0rOIwJ8rfpN8Z3NRc+NePyLf6rJQeRMJ\nnvWJQwIBoO/HeT6eeIv0L+OAj90soUR+knBimnjxm1n8hU+JBeIMQBjg8ny7\nXcl4BgZRm8urvKbfZbKrsF4Es9gnQ4xkFiqN0aQ/+P3h0W3fxDmGXxV5whQj\nUJvBlOgSvhTuLFuTE0Fbvn5ZKJkXJs9Eo+GoWw+6UdSqJGHGjG083FpRgkDS\n9xTT9Ynhk76eX9w0inX892Dn2pW6G36gGOq5RrvmQXG/ux6XDOw0XpYmI+h9\nlG0A\r\n=qNDn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqIa5Hfq5vy0/hWWRK1YK72kEpShNQiHoX7/Ji8nRqYAIgfEAlD8pTWbnI/lTwpqCP55DaRkZn9iyAaZ+6HSpOpIg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807092255_1533633942996_0.37434780435524684"},"_hasShrinkwrap":false},"0.1.3-20180807094736":{"name":"@atomist/sdm-local","version":"0.1.3-20180807094736","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"https://r.atomist.com/1868063601","@atomist/sdm-core":"https://registry.npmjs.org/@atomist/sdm-core/-/@atomist/sdm-core-0.4.0-20180807030718.tgz","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"f6ede367bc945a003d8fce7da31354ee16f5bdee","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807094736","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6UA/O5ONIawNeUXRmwCRxtt4Boma90L5ZHgxzaYAkiboWaguJB2D+1Udt9TDobxod/VGeMckHXmeGsm06CD2gw==","shasum":"a0432abb46a3bfa6e39bea86375000497ab376be","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807094736.tgz","fileCount":610,"unpackedSize":1429654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaWtmCRA9TVsSAnZWagAAUM8QAJZOo5etV7jw3K4/LSlc\niy/SCLlKscHYdDjcdP9Jr0OiIQ6m6CJdGDrj6ydXFcagvlPqflgw9uEwoYgi\nL/0OUkr9sgaEH0xcAXXEqtJkkXS3/vOTEczlW3vOr4y9DcnGI4U5iL7K5LU1\nWd6PbpM/9MVNQik2t4Z+FdfCfjGP+mvAOJxGSlUyiB5k2OAzRFaKEJeBqaOD\nvq4P5qjoGRx8wEt2iWIwhZQtWwARaOicGRN0FaOeFbo+bWym4j05oDB7yEzq\n51AaqNb1ex8zXjSU1Ajyve4sLqjbiecf03ndBavrcc8gdVBM/m0BAUXtEiTU\nmmbQZ8AqAYZk3JIAwOb3Hkhqw8SkFm+vugDSG+cMaf2KmPYF7D84rXmIpCLx\nJBCCeHlFcaUUEfTazXr2zkDNy50qClYyrZ2LVmUxS0sZj7jXrG3u9w4XEGPB\nk2Iy1VcFSwdMkqBbb108DaOkwGau+Xe/qGHKGfZgmH87XoBWdi3FEhasy2hX\nUL5/bK4AJr7nmrsIy59lL/dy4sVO+SK0aHEJuwMq1/ucwoM6nmuQdQ6B7S4W\nw4TvnS/sRvcOi9dwGPeHWlJu5E4jhxhKXIA63c9Drr3+R6zRO/niVgkz14nR\nZ+W4xvs8UqNaduxBEcO5jZmgjCcaj1isfijGZxvsCo/4OG2DzK6h2p0dbgpn\nyfRO\r\n=V1va\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXUTP5mjCGAfJpZAmW5OFzrOPT2Sq34C3/M89MDN2koQIhAJmFTqGZlSJ5HXHURA1v2GEN492xTdW0Z/0UYzP7wygd"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807094736_1533635429634_0.5425083848508494"},"_hasShrinkwrap":false},"0.1.3-20180807122651":{"name":"@atomist/sdm-local","version":"0.1.3-20180807122651","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"1ca113f18b7462245e566ead76fd3b1c52175c37","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-20180807122651","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-rBlV4r73DYJ4heYla8vEKkIWZa2S1jQ+3yT/2gayb+qdyN2zv+mtBB1USSDuIGgvc46zUFRabMTTx55wmdBluw==","shasum":"e057dabde2e318fe7ad4fcc6b1fe43756a2583ea","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-20180807122651.tgz","fileCount":610,"unpackedSize":1429530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaZC8CRA9TVsSAnZWagAA6xgP/1xrXlvy4IaYTdnQOrdn\nFzs3zZRDp68L8jQ4bw0UF5jUSrhI6bEPlJFkzdFV/eFRH5c0HAPHusYiXh5T\nRrBDvMc+4X4NXxAHb8SxLswtSIdjkT8iJG7c2uxCt0IjULLDd4ZIb08hhw32\n9txiTqDnwv2UCKb908XIUoey36/X8M/BTf1og7wbjVTmYWxn31sN2IDnFTV/\nsLq0nHy/qgLkvdRWQHvJEY21iAd/PF90WZPsoNQyKwW/k8sWQQrKk0M2UbLa\nc8ACPW8VvzH3BjWpC7hKFoYubGxY3NYnT+PvA+Hj75koGD8oAsKCKMeP0/VL\nQ7Ko2rMYh7IKVlwbGtUQE7vHufcMWnaPCvRlsJDI7StcayF93utiN+cQ6giU\nAMvtmJmgP1hRawlNKmrulk0x+JTJcEDKGS02UNzxaWhFa5Yb4P7RtvFU+Pbo\niHoXqUWcATWNZYHICVwOgerlJfIpuWMOJLKibkNxlxgGS9GnZCtCAKfTvK8m\nzZTpKx7NHuGnhs+PWyUWWQfdEqIEKRa6CgWNlE+ASbe38mYRa3X16zwbOYUQ\nzcWTkE0KUVnlyCkIfOsjuVQyqqB6+r+uaiILntzr9Upea0sTtjHCJqcL/1m2\n8DcKcpjJgvSU1rTr6G9VX/DsPuDpWMBRfiWvgNQGI/Fwj4iKxS5b4/DfUAr9\nNykY\r\n=MYW6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH5hwVmkRE3mZQ03SgnBWrlxWeiVzIF+PRsMKEJboMfVAiAKqL4+uOHThc5m/GnmsvqhdQ2pRsn9A9CmwemTW/d6cA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-20180807122651_1533644987978_0.8561350272893065"},"_hasShrinkwrap":false},"0.1.3":{"name":"@atomist/sdm-local","version":"0.1.3","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"1ca113f18b7462245e566ead76fd3b1c52175c37","_id":"@atomist/sdm-local@0.1.3","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ants6vLsSsF5RJU+YE7J5n7cke/dAlBbPztNYDjKmJaLbH43qHZ6EFBDwxLwIONhl89C3CWWWpd3rwYSO9Vvyg==","shasum":"92477d5b863e1bc0e2f6b9a9526ace609d2ad4de","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3.tgz","fileCount":610,"unpackedSize":1429515,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaZE4CRA9TVsSAnZWagAAm+QP/2oU78t/zO7EzHPCMH3V\n+j2NuZoMK5YvNj0l9m8K3h6Q3DEa6nylJSzkzvfAC6esZj7v1fon+grPUAD8\nCWgvdWMbrxbCRy9kAhPgcnqHlO4v7u2+BYPkvynco2exudfJRTJZ6O7A+VKF\nJJWED8HgbPBKIZMzhda41fw/IIfRG7IXW0ywTyMzwQKFYG3JBNeJHhtKVOc9\naQQAjBDmn5BM9mNDVbfqdGF1NGA+0oEXFgKfZ5bZJBuZ0Udk5H/apbKBHAXb\n9o4SWq4P5AHu5WoiXrs1m/CNTFVga5+N0MK7PjfYRWssP3gTGdEpfx0ca2yp\n7SuqPUb8BKjU6+/+WTVV+AnJOlxCd5CTe8QC07SyQSYPZ102zpPdWhMrle/y\nQi9p3tCCzfnOTLVpuYwrBAln8RJxM1JyPm3/kdHMY8opavbOlCdzfevBPsmw\nO8lBnMdGk7h2zo2pqoS2vgDHvyORe7lqND8XW77OHRYW3+OtuXBn460yjiI/\n07ku/RG90x5djadWAF+izUSsZtq3vJbNZxwh05mwyJYO4IUSb1sA1GUjnZIh\nsSn72993S+8YR1wAEWNyKTiPDMXHwjwOtjx14PRX3BYYk8tAPi23jeu0Ek/O\nZRKdVpFWqBzBsj3PdVyaibvIgqypZnoTJCQXFgIEaFqSh8AzeOGcGYcTyDic\nHnBP\r\n=6k9D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXcvm6iNrh0VZ1Y0MCCbwo2lDXe/076UDBKGaLw5Ih1gIgc8xXpSmMbOOOYztOZIPtVQTZlg/c9pBPAl9GCM6U/sY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3_1533645111551_0.5226235996741704"},"_hasShrinkwrap":false},"0.1.4-20180807123258":{"name":"@atomist/sdm-local","version":"0.1.4-20180807123258","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0bef9fae38ac308c9205f35c064cca1b07c8d858","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180807123258","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+2M+eLjYjNvnwnCUnkFHJPawcrI0giu2OvW4GoytE22OUMVxx6xq7yoanXuZonupFXP8nErWIBiGqTk1w8rR3Q==","shasum":"48d4fe5311a82115ec0a7544836b6f2698400ec5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180807123258.tgz","fileCount":610,"unpackedSize":1429620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaZI/CRA9TVsSAnZWagAA++YP/3a6js0H+K6m0RUrbuSz\n+DAp4xhwlLRPd0t4DMT7OnwQaX+g6BjwzgyjoiO7A8wBd2x8muDeYOBtwd9w\nzvQLgArFQWi23kHnD5fsWCP0VWj/BFttoqsR0An9bMo0cd6ZuavDroaS156p\nhlzeW91AlsU/IxlUBQwstYwGRmG0ZSFCFJoJl/+2utnswVZL4jps3VJkwQwV\nQ/lKWQWcamBI1Q9AHAiDHiEg+WW5JlLsvHThUYksd+XKn7c+dokd0G0nx9Nl\n0d5rxJDHmPtK11GGvXQWGqDU5j0aZHlVaiUO6EzKaF66fHNUNo/XLTiPZaA+\nrDJPqxVEMk+AfIZBnHm3t8PKEvttFR2hIWg4PxZNJUgB/jGSn2g+AysHVqlU\n94KwXxz0UjyvWDzXnetAKFN4AVpCNU3cgj7HF3toqHNhWldCzQ6SrVYdYygU\nSY6QtxqwpnPKvobr3qg0LN6X/yvd55nVKSi2ChaCYomYkoCMFjMW8HXnS4gP\nw2II4OIy8Z+h/qQhbR6qgm9Sp/rGe1x8I4d3eFbThFTnoaWuJhcEy8UObTPR\nJ+ELg7qe/NO5U5gNU/BwJGsVcpiJujdc2nQoNvgAZEQI3CM3+z0PD32+UiwB\nkYz85Iep15gYTuHk7U6nHJCex9HXb/gfjcH8lL6BUhEoN5Bd5wdfBB0V0Wvn\nzjhV\r\n=7tyW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICjcxDjEzy+hIpP0IO5F3czvYX4xh9Uffx/q5N0c35tOAiEAgI4JB1tnuqGvvP9A3shtY0CnpnKk8t6E5y9Gg9ipuyI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180807123258_1533645374849_0.7945761367106645"},"_hasShrinkwrap":false},"0.1.3-fixForPathname.20180807213254":{"name":"@atomist/sdm-local","version":"0.1.3-fixForPathname.20180807213254","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"^0.4.0-20180807022858","@atomist/sdm-core":"https://registry.npmjs.org/@atomist/sdm-core/-/@atomist/sdm-core-0.4.0-20180807030718.tgz","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"ae6bdbc654ae85e2f7f76f2eab304035917e12e2","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-fixForPathname.20180807213254","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-96nTxJiomAzN6qXqV5O6wA53OdCNeynqBhd219Gz8y7eymcp4DWXbSwFD7aOih1R+ujcsWzX9DviQhHKljFHpg==","shasum":"c9d1e2eda700405a7779202da1445b465c0ce02e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-fixForPathname.20180807213254.tgz","fileCount":604,"unpackedSize":1422040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbahC2CRA9TVsSAnZWagAAhW0P/ApK8idYajhMlyZ2t3AU\n9B19UJVgN6twxzl7iOOK2TYRy5OgQ2dzoY1W80A35Vsuzr6XUKX4aZ7eRZgi\nAdOTVt6Efcwsh1Fc5xMggsRELOLb9g4DAYJqL++oRKBUhpgJcn4K2gd8tOXF\nKXY01zUwaGn4byXDhsYL+xCFu4SmZDzcedjJEf6Kh35z+rxIqfX/K3pBKDfo\n8T05h3YiW56Nk0vGueXrucnmicDaLAEKkQFnyH7p1osnyJTb8NczXcwOrMLJ\nvJFwR4oPu3I4bvg72jK69k7iyKyfMT7D6SvOrqFjSNjWK2OzNqi4fPfuKdD/\nn8Ra3yVt7i/Im/10suOoZPdbj4YnC4R+AGXateJ9i9uJfc49cI2g4iBumUZ4\nsF2sYmACJDXbAXp2kDu73Uz5lh6cAR7jbJO0VSOSYflFlpDnEs5E1GJ4SBoN\n5ENMnPblGiZnxQbO45g34gHbIonTHgOckbAk7+RmJpyyDif24Qy+a/n6tSqL\nFH0zp/N8zV9q89T7sjoGpFHXlW1nnYHIRUHEYV8dG9+g/I6srbHk/0LKU1rF\nmIJsqmSwgEkN6ZrnAwR41bbSNRkn2dqo0owXLORAOqEoSO6YmZybn7fNwRBw\npVZ8/M6RRdh4GtBULpbnToxgmcc1PqNwiaaKabJ8r/y6WiK0c1Y2AcZgGA+Y\nMn/x\r\n=0e14\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHX7/weZnLY1ne5gHcKfp0z3aixvreSILNZ+S55D4Jl2AiEAu/+RkMKvXShyAQGsUGuCJpBdt+N3DFqPApY4RPWVGvY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-fixForPathname.20180807213254_1533677750323_0.5284885292852819"},"_hasShrinkwrap":false},"0.1.4-20180807221948":{"name":"@atomist/sdm-local","version":"0.1.4-20180807221948","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"e03dd2da6a013c532fa4b3158cab534c01056c96","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180807221948","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-DYajU2JXerZISziFaL9hvM7p9p7HkT5CcE4a7CI3Ypix8td4lEXpq/w/f8MoQsoqamP9JAvHmZ6sKcPXc6B8sg==","shasum":"c0976b0874ea9c9aaf8ce1a5cf10154a2ed01bb5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180807221948.tgz","fileCount":610,"unpackedSize":1429668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbahulCRA9TVsSAnZWagAAbLMQAJhGbGBYWpIqvcdak3oW\n8vIJch2A3n9YxnQLP++tnAF5ZPBuYY8w0lSZMfBpMcIqwhQosW09UOnd/NhB\n6VJPEq7kjWNRw/zysye1xZQIZem6nMAH1dvzwYnZLOGZ0R24RKXu5sZDJFts\nhIBd5PA6Rmz8jMlFVPahL8zSJtvtsgHK7OjoGwA+KWWu+/hGdR0JwwtrTfZ2\nAr0Gu2mUx8jXsEsSLsD5vnLjBvFTsxpN94HjDjCUMoDNd/9jafZ8mgJ7HIai\n3PnD0/ote0rhXr0gmd3Q8uxiZtLGqPe9ibP38nJk6oOSt5HiiVFBUXPKY54k\no+ckwKsfcj+sYDhUvtd29CWZzUuoH2Q5Xjkns3tBhT2e/w41n3Fh4Igc8c4n\nC0zhLtOKqSh1eIILkEEWKiIb3xGv+tUcVpHsJAUwFg1Q5mmktw7XCoEwgwsF\nX2Cv95OqoVrmd1+BroZAjBHAaV7iiv1aNJU7q4J5xqlsBhsh/LIS+4FF81Hh\nQhSekfztQYotVC6q2qrqPtujFTdBa2EmXvk1oQPPslO5+ISWytc82mWrx/bD\nhzdWVUboT/zolIuqWNYnoRPhF7CG9r+XoZVuaW2w63yo+NjYjwRiHSZ5oHaR\nEb2bWEsgWJoaAdbKTJxJLslSSX7Uz9s/8vDqfJElt+iKWkynarvpE+nKekIA\n2E+O\r\n=E7ab\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8ouqMv8zGjIDIWgHodrnYcAmjONRaKShHAzpPRxjNBAIhAMxlhwehpg9gA3goPM8WpukI4yUyDnQLIxRd2VhW1EVj"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180807221948_1533680549524_0.14585842138333027"},"_hasShrinkwrap":false},"0.1.4-20180807231052":{"name":"@atomist/sdm-local","version":"0.1.4-20180807231052","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"7df049b69421b9883c54e12322f3b4af24cd9241","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180807231052","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-HUkOkfWLrVUZypPp0Gpnj8V6bOETfsc+ceeZceHTc88HOub3CbdLMSSt2LRseQD4YvS+dCku7WO/PQSF3D73YQ==","shasum":"5df45cdb1297e646dd6b8e9c7a84192dd54b21f6","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180807231052.tgz","fileCount":610,"unpackedSize":1429966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaieqCRA9TVsSAnZWagAAFe0P/2e0b2DSNbwKX8h/wMcw\nY4xbaBMNXoq4DVhVxVLnTOU0K4IkV5NYpui+HRonBdqOwFcyqze++fod936D\nMjqm2rjFun0h5SUpi8iAVHCrO/DrpiazzLjm7VfL3uSU1sEaF+GRzbwI4OrE\nVfFsHZ+wFc/g7LehV2P0mawNsVc5grs5yLwkIFHgwGmU7X46mMdaPZA6YPw0\n4Vo5qQDx9YsYAImPj5enrkawK4f8C2MhmsZr0bzYCzfM0hHZkoHgbkCbgpDZ\nIE1a7ZSxGCre90l4OG3e85SfqOiXFqL6oDNA/BgqRNAgAj6kD2x9o/Ewl4kq\nWlSzo9FkkdxWqBTdxINySMxnlLOkK8ysXuGi+cWaDGCHxsjH31wVFJix+Jh7\nbFkuITI0E9nIIV1Tl2j/YpOTC4SffCE3V2RCwf2/QqLv3B7KmgTqOj7Bi7Ha\n6CkCHHV3QFHaSA8hZCBCL7WU9yxfDCRRfxgb0pi7Q1XlOhCdFweRi7eXtDgX\nWqY/IekdIPROaTrfWdrIdMmIEZS7R1Vohd8zJzRrGDJpMq6EvZ+yR6oVMcM1\nELrOpbDVdjDeunF2T0QkWfFBKZeUhzeaT20vncDd6KYNZOVequPdjp27nYdK\nI52x1IwBvE1m+UQTxHktWfqi+RqVrcvHbn5fDEnK5lS/iDdADV8D+wMHpo8n\nAAkZ\r\n=6orD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCehjMlv0g+0poYZmoVfD14RXFXNZyDlRNZswMY9rkH7AIgN6lVc+DfNNHv8INvPX7KZStaS5fMB2hp3M4qdEJkhG8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180807231052_1533683626220_0.8720408187465352"},"_hasShrinkwrap":false},"0.1.4-20180807231751":{"name":"@atomist/sdm-local","version":"0.1.4-20180807231751","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"3b1867aba3ab1fa53e8a6f6e53460079340b154e","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180807231751","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ptSRghrQ0ejfDWqJQrsYnxdqmzf9MBiT9F56ETxQ/B2QUgcZs4+JmpZ52qz/oYCSRcg4kekYh7EVxfRlb9XrSA==","shasum":"1214f9b1e2dac9fbfcda57ec592730d89f34f7d3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180807231751.tgz","fileCount":610,"unpackedSize":1429540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbailBCRA9TVsSAnZWagAAhn4P/0edGhUDCTMujl6aHAza\ntQXU8p8cPQm55SPt2Ddm03WNT6VhzivFaJZW75RAPxgG/USv8ybbcDSCKlb8\nC9Bjuq3XCu5mGXm+q7sKC0XLmlhFK3v15zP3I5uMC+pABgPD1ajH9g45Hkbj\nI4r3A6FiZLuLZz5tvP5rzRqiSj9HLJq5IE/biXVC8QBY6Oyal3ES9fOKXhPl\njilFT4fidrJJA0Q1yK/qmMu6qT9SeTIcufZqws5SNP2A7t5UW0nFs/DBYfJD\nYJvu/v/+LDyh6VXA3CBZAHkfD35tRHEdeltCBnPtcV9QfmCzVHK/78A4vQFB\nng99vDR41GTyu/rTtZmE6yDI269cv7m5YpKAFYYsIjzMmTn186cvEoDok0DP\nqk2NeOYAU+9jc5xv4ky5Fjx8l5VQdNt3fw54H7RUf4QJqLJIi+x37ojBcA/b\n1hXXr07YET5uW8lCJ76AoMSoDAyWLsuFm3jKXVPZWZsMZXg8eiYPBeiLc0OZ\nWnzVwUDKwsfYBAMgxR7Skq/QhMkA1tZzLH13PmZUVVL2krRa/JGetlFcqmAi\nVd0C8ViooG47h/p0SszmMDcLww7cIN35DkiJmnkz9RCYXC0UnLTucAsctSM7\ntvbp3YLB/68A0XElUo5gTKDQ2lpNCXA3+MUqIJzBNehbGyDKgWBXTo8puTMT\nwbjk\r\n=uuI5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBamvmdfvyrFDmyWsTZXd9wEhuhD+msCTlUfP+URPdzFAiEAmcpIydC6/9vDCoOk7w6eFTc4GE6O14PuEFYL1IpBY9Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180807231751_1533684033036_0.7328671387221315"},"_hasShrinkwrap":false},"0.1.4-20180807232356":{"name":"@atomist/sdm-local","version":"0.1.4-20180807232356","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"2d8b6242da2a92945f4cb4dd1d5fb09c1b49f5f4","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180807232356","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Gv3yaWZHTgMWNSIBBIRRZ3zHuDMWjskE4bIu1sNGCQT/VYodbb4g2GziOaFM7uffvJ3GbF7wtExOdizDBJMrFQ==","shasum":"85811c2c3b39f2aad0ad9feb21919121612d76b5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180807232356.tgz","fileCount":610,"unpackedSize":1429716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaiqzCRA9TVsSAnZWagAAUdcP/jgUYpfpwIZWcOTu9zO2\nCc8JdtSeQkQ3t/+oeB3qYStm1pSzdWEZM6ghcJL7akcA11/sZXjsYR0Uok2R\n7/kaLkymGCtodoZ3WFx2ZVsYEmT2pDElRbZcYjYfoQFdqgQx20MRP1iXgAJW\nAVsCui4sJf5+ztVHgxpLd3STL6V1mleAhQcuQDs4qJ/oaf/s7KzWHTztglXR\n67gcY6ZyoswENnkXHYMFQkPG+zIJsaAIq1aACVIJdg5luZc2+aIPkoLsmfsg\nsiDXmLxenl0TDmXVNHeyudFSGLq0o604HaPu2Lh4c3Yh5/Mn97EdRBo0lDSg\njSBGtU9r12bhcqn/HqdZzBooKxKzrkaRFVQNer6BHCaW7OvNKaLZxc5uQMLq\nJhq9ezVr7ueVDMlqtEWnbS9nIqqy/dbAkxi3WdC66kjXCB5f41yQT6sNL45x\nnu7j8Vxa2jNpG3O9wXjhrumbWbbI3Slk40WdRB6FgE5IHfutrMsPx4V8RunB\n5hlfGGRoA5UBYSfH24sizQeLtBHDDXd1v2A5PSJHgAwHaSeaCTrRTutPGxCe\nTlgx8f075NU1cOFCtWh/SFH9LMR04zbEw8zQbqZOOTYtzgI+qKxU1G/Aob5f\nB/11pKfpO3kOzkA0NWgn0gg6dg73XajT3XV+5FR0b8pNfRGtpHEaAe3/YybE\nYYgc\r\n=Ankk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoG0jxtzZXiAcetaj2dcMEpAGfNpA/6jzbfHTm5OlWtgIhAIX1IRh8VPMhIYEPOsAam9BbXezQg+Y+LV85gKcnJ4fr"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180807232356_1533684403049_0.19684196794525222"},"_hasShrinkwrap":false},"0.1.4-20180808005050":{"name":"@atomist/sdm-local","version":"0.1.4-20180808005050","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile copy:scripts copy:docs","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","copy:scripts":"copyfiles \"src/scripts/*.sh\" build","copy:docs":"copyfiles \"docs/*.md\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"f2d608faaf8454d4e8a2e1f8799470182edf4943","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808005050","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-NomWSOF6hOChWKM5Ui1szGELjK/RVfFafAaIIl79IEdwhvY9oCaWhg957laavbi30Vk0wMEXF2SKrUlYeycdAA==","shasum":"8ae21c2f64830fde2aa57086d786de548aff1639","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808005050.tgz","fileCount":617,"unpackedSize":1435717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaj8bCRA9TVsSAnZWagAA3icP/3RWmt6TVXo6tYKl2VUB\nRcdbmI34D57nBj9hx3wDuSV75/fx+C/qalikMKo5Se9nXZsiPKj2aYQibXif\nbgkTKps5Ggp37CKvcE0C/VSiDr5Ks5Wag/UafkxiQFWBCUGGuWFR0gS1sy6P\ns3stWfCWLAyK8+jP+l66STzva7dN++ppWnJuQj03JQs8MlYD8ixGwxgifB2f\n8BOjiE02gQbak4mUC4AZF1hTdhmmbMOE3i2xqoVznti/52wvfryJEusHSOQu\n5klWnNwzHMESASbMoqr94m+E3rT+PgAo5W+7p3QV2NiF/eRwePKQz8YMPldD\nd0XyqLYLdU4PpckyhRHf1qIWiXWkCF0aoP9GLtmsL70h+KWRWgMSDPZfGE04\nXQB1edkJxTAgvLGrw7bGlRWGwlFV/zPHpK9rFZRQgyyeioftFzWq0EOB57Gf\n9557Rrpb2cqRgRLqKyPyM6IE+EW7l/W4TrTLq7/gc6gif9W3kgSkhOR9YjNi\nFe21mXlACt2CO8kHOv1EjQkm9etLcnR8WqmpbIn5fOTUYi1kzF8MLtrEHiyf\nTHr1SEa52jrnAZzvkAmd2xd5xdwA0eSLNUmdo6oK42kagfTX3tblGRGbsioJ\nWC1OvMFc2reoKcOzbk738LOySAv1o7fyUNiDClbxJsUEa0m0dB0AmJpvx8KC\nL+fS\r\n=1LtO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaRE7MoFs36YqhQendnIzGziyMnfPKm1+ZWLZY9d22zAIhALZ3NTssbC3KHFsiqoSvsPfx09t0RViQtjyI+PjHFB9V"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808005050_1533689627026_0.3256291540526419"},"_hasShrinkwrap":false},"0.1.4-20180808005808":{"name":"@atomist/sdm-local","version":"0.1.4-20180808005808","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile copy:scripts copy:docs","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","copy:scripts":"copyfiles \"src/scripts/*.sh\" build","copy:docs":"copyfiles \"docs/*.md\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"87f750b2ff111fb504ca565fdab5efa44b6b80c5","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808005808","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-apXAxUjJdft/TYVLnTUSuHwQKt8gamW09P1ewYmIkQdRGPaoEIHAV7Nnt7t/CoUMKeFi5JvQVdeLoGERMzPHYg==","shasum":"c0636333bfd16d67ad281c513b62837f6c63d55f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808005808.tgz","fileCount":618,"unpackedSize":1436293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbakDJCRA9TVsSAnZWagAAGJIP/iaM3PImDRwPbMIMNoS6\nJ5KDjVVz2Nh4t2IGumA0vESzpwQhGDb50NGf0nz5EnzkYGt0if5VkH6iEFFF\nWjDMOqdztGWZ8Nmw7+cvlb+ZeJdt0yuVhdIBylXCF9R10UHmgysL42KhyE7d\nw95RlcGJHzp2FMwidKzqfimhG3WeYKmK3/nwNLYbSqkQYD4LeGj/J9LNRLZ1\nq7F6bCC06EfxP/sdzW69XyjTPLxfNowNIn8vyfCJnY9DPvZBrBBQXt6nW3IQ\n448pB8fQxGFMFvwSjxKwLXKRQA1bTpT4Urbp1UUn7cikLz7QwXz/GrlNuvC9\n2slJMtlGtGJ1vX2uO9mNPDEin1PNummewVrxVRoOfpKHyfPGxOHg+M845bPC\ndizBHf8Z3MDI8AUEcFhty/1Rzxt2q8Obvtop+8Us/n2Y2CizT9QaZbafITYH\nKeMJaSf81mvYMZxEjhfAUMdeX8NUPoaZhDtTuMjuqKOVzbrA4bTeY7EYus4I\nc4UTxrgVBLMV0BpUcfTirvxwyrHF/pmNhQRuV+g2N5MfLk0eiwe2Kky9csIT\nPRF/mohldrkXNsbwC33/+OfvO1AoBs9RejTUQ477l/pbQ+To8deWhOvQ9ECv\nekG1RedpmJJjb4/1TlQe2N9sAVDZxXWWbtD1i39TtXChl31sDZ40tDZ3ZPZV\n5hre\r\n=ybJE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH/H9Iojv0Iaqfi00z23StOiFS+e5GC1x1UAJfMWfbppAiEAhH581SgDiOXaDDQxLvCw6Mg61pwRC2DBUW3r1ytPAzc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808005808_1533690056851_0.8034303513270409"},"_hasShrinkwrap":false},"0.1.4-nortissej.doc-error.20180808011449":{"name":"@atomist/sdm-local","version":"0.1.4-nortissej.doc-error.20180808011449","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile copy:scripts copy:docs","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","copy:scripts":"copyfiles \"src/scripts/*.sh\" build","copy:docs":"copyfiles \"docs/*.md\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0169d73b19e20e2cc3da089c89238b32e25bd5d9","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-nortissej.doc-error.20180808011449","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dH5nXBELqq0IaQSSYbSv8xRfWStwKqmh8RQWRFgpBvN1MLC3EymwgTKYNc7ffvcUZPMmxBDzEZfuw7CjlP2d5A==","shasum":"6095d8b34799842fb88bdf36eb266dd92ea5971b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-nortissej.doc-error.20180808011449.tgz","fileCount":618,"unpackedSize":1437328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbakS5CRA9TVsSAnZWagAAH38P+QAsM8cY7D58HLL+LDSr\nQYyZag7Y07BUBOmN5vV92qx6rIKorVBT3goMACRl/mTISiZW9orLbzJjJBuT\nZ4U6JqtBKP8s7q11/v9FIe7PdEkyQRR0agFWpendMXCal9LMatw6WbuUOFsg\njbvwUrq40toeIdFqFCXvHOLEhv9ACOUJbwGrcm9YwSa17NzwjjHmtiO/s+00\n28sirk3WyKAS1GzXj+kDpzm22plCtApRJvfMhHFz5/hsrm519bupGULtG/bt\n/zGp77xAJ8abxdotzkyLxg8L0uke23hNoCpzHSA8PYmV+02Xia37Eoe7GdBh\niO1KhYr2BkCQHABWJXQWymENf+20M85tcTQzRMCPQR9RzmneH4tUf/V7pkYu\n7KHqL7HSjsTEEcbXinjk4UB4nedXfOPtxFcPtDOR8fDgjU4ByPSfbW1AB14d\nQPNTu4RcC4wAT5u2/pWEzAe/Omd0cCOI3mRZhwKt4TMcDIHpheoGIexWp7Xl\nMBQeOkjHsip/DLkhR8oM4lfTxqFu8EQ9t7LBFatLB5gUbnGAnpOR9QKW+h2p\nnaKrtY+/8raVMcR7NUq7KUxqPoxWL05OD5pob6YYgcnkAajoGfoMq6nU7WCR\nBL9Z/Npht46ugxUOWY/vVXbeoq5I01/N4WzlLqCqrkofXXNWKVVnVy9w00dg\ns1hQ\r\n=T9sj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNILzvYj5FgsCgsSrr+TWYNdRZ1QdHkA0BvjB52CJifQIhAJUDro0CyeyuyHhAPGk9Fa6BRU6EM63l4PqslifhjrK/"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-nortissej.doc-error.20180808011449_1533691065060_0.537437175905422"},"_hasShrinkwrap":false},"0.1.4-20180808013045":{"name":"@atomist/sdm-local","version":"0.1.4-20180808013045","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile copy:scripts copy:docs","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","copy:scripts":"copyfiles \"src/scripts/*.sh\" build","copy:docs":"copyfiles \"docs/*.md\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"7d5131b427a588034f965cee28c9ff1d25740a3d","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808013045","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ZQ0v6qFyfivh3NPDwtxiaEScay0xAlYPqCDQblULAN+jTUrdcNdglFh2uPySXPAZcnU0TVktevX+2CvCJrT11Q==","shasum":"f7d88e7a4f4cc423c0597684068437d3b8944540","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808013045.tgz","fileCount":618,"unpackedSize":1437308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbakhoCRA9TVsSAnZWagAAcpMP/0v/pld3MmOgVY8n/T3g\nEnzXi/Asf9X85XiYPUigqbsq8pbNuAQIRGFtw6aFdnbGyGdq1w1mvqjBJ3xa\nhDTUb14a40n5G3pnd734AHuuO92U8wq+t8MdzVzzeQIRfRcZ4XwC/T0c1kdL\nm+VeH09XTxha6wVyNtdHKvxUIThgqSGF74nOC7ZIsHBDGvPbfsdal/vPkXKc\nMh1zpas5MX2g00OuYM0JoQg8TiVX/S95sCmSwFs2JFl0UotfO93Vq0wlv4Y0\noA+DEj4nz3nnfo6dJpwjZTjntrEVZqL7mT58N7qYGfPQbZAtnBIFe1Yeq/K+\nDUowiPIgMhEXhMDbAzy/ddPIOyCHPd8Odkzaj9Mdg+aHMw3Uvij84OnaxmCR\nsls44p62bkwJGyCXUvDas3WSf34vAhwjad02vcR9dhohoImD9Mz5+6otc7dh\n6S9HKCguCHRWj0igijMsyuWPsU/bQPOAZVnuOXykLFsorNm+sM1+HcAsGacc\n6jw1rP+dNkw+T9YA0+A45KiHm2GpQ5yVPOnPJ2iA9xXT1bEjtAfI5hYO1qxc\nnTLRC7sgoWsksXlSSSDFBXN6I/vZCUDhR7FgQg/BMRHKS6UCqgzZ2m5T3czs\nYs+eJ4dGJfmNU32XimpN94xGbS5AMQt1niwqxjDzlop5XkPSa1o2XTWN5Y7p\noU/B\r\n=genU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1kPwct8eVqQNy1laydj24kVGxDgOuhqUFPMyoZ1U0vwIgRbGEGlLjNccpMLJHKnrjiO0uDllZiQ8Wmz8Y0AE1lP4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808013045_1533692008650_0.7281322760096414"},"_hasShrinkwrap":false},"0.1.4-20180808021137":{"name":"@atomist/sdm-local","version":"0.1.4-20180808021137","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile copy:scripts copy:docs","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","copy:scripts":"copyfiles \"src/scripts/*.sh\" build","copy:docs":"copyfiles \"docs/*.md\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"8f9ca6b5f1549506f1079dd5a224b9110b9541e0","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808021137","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-PDwnGscF/fH41EE4WkAHjbJSSIi0CwB62yFRWTxrVZLL6x524RpnF7NrOM8blULoipRt/UgRZoHrT3OnvV77AA==","shasum":"f27f58e0c49229925f90efa16ce3fb2281684cb9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808021137.tgz","fileCount":618,"unpackedSize":1438377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbalIGCRA9TVsSAnZWagAAII0P/3WjatFVV1j5JUHF0h5X\nYRRuRf6FaWRFO8RMWLREb5a+Uthmn+IPgRSZACIwlxGEgnycGOQf3pk4csMC\n7B8GM5NtZLSNffuq6bccnhTZNvjUOKc4pwLylpY/PHNxa6Qj+TFm2x755Pcm\nFO05VKJD9XhtletMe4xYaYAIwr7PHg2lW1TBMZomrq9jJyKYeFGjxJJbz6rU\nuJU7nyWLXRMhjZmsWgGgzm0rddBK9X4fA+cDj4KogWfi2L+qhzOxSlmzGapD\nKXu3+4f3MIlT4ACzckvbEtwNue2arm365sIHtFXbGrPW15gvgAbAMt5yTx86\nPnpMRlVVZOmPIa4gFAxe6QLUbiH7vFMMB81H4BiFdnE9YwTrnpI7hcyP36Fv\nL1wmkNr+UJRmtOq9HTsEtBCBTmSRNzj97tZRDnqBa4Z4SDdfr82rJdM5fPpI\nR8+PpwJIlDN2vMOhlgl/GODWnv3o6zny8HkIK/Kw84PxtpXQ4OkBVyQwH3Yg\nU6OpFECvKVfGmLN6CaSALV5ljW0HY98nZueXJ/k+2YfJECT5rTEBoQeYNYjz\nps3cFbVW331OA2hxoLg9rdRscDKKGmZH8Fi/QTVQwH1zvs8LSM6gWHccgoIq\n5yxRhBpTY8lqOvI2t5GWcJZwWwwZCHOxPDRMTfcmZ3J8FcCzI45OPcY7GLPl\nOMnB\r\n=uRm4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBMxG+fIkgNDzfTeDHPfce/oCSdjYPJLHxTrYJsnMAewIhAPhvUDXh32zTBn36QyGgB0mbLyd5A4Xoa2ykWhZqVN0X"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808021137_1533694470536_0.761875913388113"},"_hasShrinkwrap":false},"0.1.4-toplevel.20180808023212":{"name":"@atomist/sdm-local","version":"0.1.4-toplevel.20180808023212","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"89a91177deba3af3a0a0aec2e49855b4b6e22237","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-toplevel.20180808023212","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-SrV9jw3j6Raz/OrTSeemY6c7oIXJ3n50n9gXyobKw3ylNzlzLNq77GPhKILn1npcaq2owN3eGdQ1SgAvu+WhiA==","shasum":"a9587280d82f68ce28490acfd9d6436af01c3e68","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-toplevel.20180808023212.tgz","fileCount":16,"unpackedSize":534400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbalbpCRA9TVsSAnZWagAAxRAP/RrmsaCqpjYsgyd17xrL\n3mpb/qtrBeT5Ilj4qzTkdbDUH0DRsdvR5rJbbRUWOmJk+mR7Dwr29Tp98Noe\nk3lPezIu/3BGJHTwm8RQPB6PuSsEWXLrNdDzjKeSR9QkxD15osjJjHMLb4Ld\nPtgEyPGKpj6NsjHcwU8eB+RCwlIEqP7xeR4nGgv7slt/VXWKrQUZYaBt9Img\nJJhbbnf1NMXjlT7KE8KQQjkQaCPFCrv37PjfoW5cR0bhpC8KzLfqaujYNLo7\nwj4j19IkJ2xWEbBfeZykP0SK15IWFH5sgq7hL0tRSS4rEo+MbkAZuPUgeeyk\nWBJCRreznJj9ToMIMVgWE8PoEGv7UK067WcH6xBTkEW9dngU2NUBpHssFqD7\nV6f8a1oLkis17MvqB3jLL8+lgli6ehBYGMFO+fWfXFPRXcATAHQcK1XqTBT+\nxmPCxwa3FTxeB39Sef0cTCd2y3MCZq5uS/FZ4YFQ9917JyQh8LggP6PWke12\nnaZHM9zvuxfYlIoKKSVZpnvfWjdLibwVovdRvaVFqDGufbg6tqWv0RK9N1KK\nEbMtd4SM48iVPrcUFt4f+0x/UJElWeFZ08gntjRGhKWJbO0Wv589GjYm4Wbe\n/Nsxlb7dSsTQdn4hPo8DHJ7Jdtpd69so6tJCJRGd/gmD7s3VugqMlxhZG1tE\n1Bs/\r\n=7C4q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC59i1vPlLZVth9zQnsV8yuKm3GH+E1r2XdawpDC4OZuAIhAPQfnkTPvFm5mdBei+3el03a99z2Jip1iAwB+bCTQShL"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-toplevel.20180808023212_1533695720840_0.6792203339178451"},"_hasShrinkwrap":false},"0.1.4-toplevel.20180808023417":{"name":"@atomist/sdm-local","version":"0.1.4-toplevel.20180808023417","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"089758c972c1f96657ab5c3a9444b7c546783ef6","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-toplevel.20180808023417","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-otFTdatOBYG4HpeLXMwdBKroA8tXxfTuASVxGBUl7dK11V8m5kv/IM4vTEo1ZqOoUEN3PYCsRxK48lhFTbBwYA==","shasum":"d3d017a9809b11fc190c27c3b9da0ca90080fd2c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-toplevel.20180808023417.tgz","fileCount":16,"unpackedSize":535624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbalcxCRA9TVsSAnZWagAAW/4P/RHIOn3X66ExX2lf0ARL\nf8eymLZyXQsu0eeJ9mkcwBMHhDFX9TonTJg8HxoJ8jq2j0e9ayyN8oIiQbK3\n2WEVbHm2pYNQwbhwDlFQppl8YJfWuK0B/EiJyxiUZkCeW904GmsC2sXkJJkg\nxa9B/bZCm9KMBpaZsw33AusYA4WOahpANC6f/VYciIf6twRrCPSbWGZbckD9\nh9Supc60l85RPO6LFHMSG2kd1zcujVuROYZiVZsellhhEOgCyPlEGbMLxbeg\nLq5v36drCBx4dxPiCWzi/RE7LjQDI1PPvQ6YDOTH1aOT7FeJQa5gLbMWEwFO\nJ+2BLA1O3giZVFpwlACGMbFiFv+MY4sjmGPpecCUkMitt0WiI5cMZ8vLiz4y\n1yMPJVVdjA4F1MTc7+1QyMOkcqf3AjCJRYkuu1ljm9TsUYt+Dnmbv5slueSM\nh1rwrT0Whotsk6RJkEDn5lKRa7WEqtrJNUAbuXHEYst/8dQkIearqdGgvzc2\nzPddRJYp+amGmBCJTg9RY2ul3h/Tk2yOma9gfeUXwldvNPaZVon50ttSFM2j\n2II+5M+drZlx7e2KcGluMnnLY/rL17SzrWn1jQnWAVGgoSQhuqLHuCbVpgar\nCDvVtjqzmtVTZ0rNjPCnrlDlBY5Mh8IRM6Er8CnF8M4oXGLZbIARN/Z0MxIH\nqktD\r\n=vo6b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFoL/EWboTm9380ThqCmDfMD9NYHY7D5mELojroTKeH7AiEA7yhMfL6YZ4QBsP2Y3gQevq61MkxLDmDZWf7Cs7Y3Vy4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-toplevel.20180808023417_1533695793815_0.786997089933438"},"_hasShrinkwrap":false},"0.1.4-toplevel.20180808021535":{"name":"@atomist/sdm-local","version":"0.1.4-toplevel.20180808021535","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"13307de5db24a19c118c5b02cfd8d8b866d67b2f","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-toplevel.20180808021535","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-qcUerLhoOWua0c2Xkffhfxb83pQnmbfeWz3S9RMzxnfNEcH86EEmwI1oMU58Awjb9zGUq9RibpvEctY+jmK4SA==","shasum":"4b3ba806b00e43edbb3152445c380c7c5ff1e1e8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-toplevel.20180808021535.tgz","fileCount":16,"unpackedSize":534444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbalnoCRA9TVsSAnZWagAAH88P/RokqF+snfauNA9whNMX\nNuhfdHtL0OjwCMxcN4unI4i4qodwh3wnPV2J6X2eXseElT+N2rimCu4mBBkO\nfxaQUd1piRrNVkDnBUOT9R97A+3PYCZiIyIcb7oCr6gkzKzk1CoTe/OCIBzs\nN9ZzN+qyotl/AdAj5w4W54bzF/L4dUMKGv6k17sw9fjoYt5cS6WOZWjGY2aY\nw6nCzvuirweCSqqMlkiYgVAiayk383Xk8EBFbjNEF6Z6qCFnjeEB4NZ5jJtr\nOXmm41hWuXEvGKeZSYZpzWcg1sREWeQRSgQNibo261g7EyTiRVAvzEAAPL1d\nUmUuAShlDEQC6YG59pHxvluq3OzuOVfsNiziYjzrf2m+81OEru53T36NvlSl\nsdzNimYEM/jrD4I0X18TFqWi1aQMxksJJ/8/nC9fhym4jjNyDaqTVFNCojS4\n9cSsXKwwX+SB4zpGJbUwwg7GXw+YUAPKhPiLh+iSn9fiq1Y4SMbyv+3D9I/b\nm4Gxtwg9mrYmOO/usA48Nd+8gEOYWVesNBN67iN6+zdK96SHfRaehkWjqhdf\nEa9+YNZ9BL8rYvtEyAFx/ZEk4B2Um+J740COfEBZqvlLeUfq5B8ftTr93jtE\nKQkxHHw9HEIfLy8MRdlUgiqdAhL3jn/NSjSXf6caB1mbPGWnTf37VobJF48l\nD1D3\r\n=Nx5w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC59A/kGv6a8GsmxDdOFlXqxQViY4GpU9vmmuizUfECGwIhAL6WC/IvwzV46zFeA1Go22H/O6ZrSIGj21MMFWKv1BIg"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-toplevel.20180808021535_1533696488158_0.10139776879692675"},"_hasShrinkwrap":false},"0.1.4-toplevel.20180808031110":{"name":"@atomist/sdm-local","version":"0.1.4-toplevel.20180808031110","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"5d467822de90ee0f0926e6f1084c3d63169e75fc","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-toplevel.20180808031110","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Emq0pGoS/Q44izw/I6ky530jwlxPneJPvpK0zZosk7TyOz063nwD4VKgz4tU/5QpxCdI7Dhx34jiECWxhnOwBg==","shasum":"dfe36dedad6f7c18b3e9fe55b822a6abb6868c8c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-toplevel.20180808031110.tgz","fileCount":414,"unpackedSize":1247618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbal/MCRA9TVsSAnZWagAAhioQAI+FExfc3pERhGVQh8Nk\nz4g2hYOr0sEDE0f/XMZMkHWuyaNBrCQPI/P2pE9qZCV7Ht9MFh8icrhzQsfD\nOqMDEyyNXINiPlUEhqgrDR873+tBpYhhhLnHx0N4eV1STnGMfkV/1K8f5KBw\nvASwqNmlUpcwNqLGaIyl3XXBhOxJKHRAl3iA1DLrO6AgAMrtr54Zoroedqep\nV7zBP9sLJS3iQYCXi9mYwcOiC1Ftx917IODOGYByKEHvHqTpqh/xYQKqyNKV\nb+nQco5uZEPJ0Mdv+xIqncAdqh0Bi67D7DFECxCK6mGKy2qMlszKQ/P59kXm\nOaTVUU1AX3s6VSjYLY3tGyx9I8hpXyZcv3vDB9NrH3AZQ7nY1p88fRgUX4l0\nTv/PWWWW7rQ2l2ndKde+/IvwraztqSz2Sn/K/CNggmm8kx44QuH7pWIbs5X3\n0jX6BIHl3XwymT+ZSkjwpT5xT2xCd1HkHCUpEK6r/C6e6F5oVq+wiXufi1Q0\nV4MkDA6vlRXxX5BUJxezii2DEJT+hQyrwg6BV/pH26zoEhus8eyDgnYC4qjj\nUrCEvCOojtiYFdMCaC/AjaGq+eQr7DhVz5o06RjjibxnbvfOzc8Os0eIRfM9\nE1fvGzYZB1xdQZf5o8gbX5GWDRvJft070kazlMHnYM3jlxWqxFvkIxufAV0+\nFh8M\r\n=fUaR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHLdfo4Ocr1Odhq5dBGxjVVpmcpEaGe2NvIg/X599TwQIhAJzzvhPpYH7bXLzeg7sdD6QtKwY3KtEqUaRWwjIIaECw"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-toplevel.20180808031110_1533697996223_0.262122024970602"},"_hasShrinkwrap":false},"0.1.4-20180808034521":{"name":"@atomist/sdm-local","version":"0.1.4-20180808034521","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"a4c281d07c8942cf661278f5aba8dab5598f91e0","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808034521","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-XY5+uPl4Ck35F6wfNHuUH22GdazyuWuRfgwvWQ1FmC3G1IE6JOlQ/RD9HBbeiHXn77dSPvgiGg1V3R1I6G0juA==","shasum":"370ce8407b71ed09b885ddeee5027c06fb002736","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808034521.tgz","fileCount":414,"unpackedSize":1247609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbamfMCRA9TVsSAnZWagAAa+oP/07fQ/tW/VVjA88Obr6e\na2WN+l6hBObYWpzkQ3A/Y6wCi0BTKpJHOnGreKw3RCMv1aTXpAcCi/i3IYr0\n0zWlr6ibQabnEhLrBkBD69zKbcNyqlfHCVL8190noWfx78AZWckfp2pmFFMj\nfffx54zhZfaEfJxe10cwv+mJEHzIQ9CwnaMq/I5ZWAQ3Z1Xyb0qk8yDS1IMP\n/iD4WIzs44+XFC8vtc/efmivEX+unuIAkYr0JPeW1Jllw3d6WfZi5Orp81Px\nqO8VmwWuk/J0tHzD1cwWsQJSPKUXizcy4Uelp9nGii+j2DlkZT/dVYmu4L+z\n8237QJOY4dKcmCjoyNEwrlmzhbAADbALtmSO55ojCYnPrvVCQnrHvtt+HYVC\niDrw/dXWwYoDh1Zulym3gcYXgCh3nTLwJ7xIxziqRwCk/ib4YntQSxDS7SOh\nf54JhKt7kUvzT+wk/WvfU77HfEzDgsksK03ASzJafT4TCPm+72zGinnNo3ih\nA7LkMd9jniJlF8uvpAExYIsgR3sbD/q2MVbgnAD9agW76AdOtXVvZBT7kF0p\nk/a5YzUa7gK0aKXF15BQm/G0iWIXHQfCmCnrX13OaexvVD95kpBT/3wZR6JL\nqyp0xQesNDIxJraP/i7/Gjxr90ASWfKRVYSL/KtJ9NBVsxwI4pLq3nYGrXIQ\n2GoY\r\n=+NVb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDazQ2W/GziRWu5ZY08fZmpk6F84P+670HrqrkfUFSLgAIgYhtBsp1GehjJJVVL5yVv+4F36efGwUiGuxG1W2bO2sk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808034521_1533700044191_0.7879999244021314"},"_hasShrinkwrap":false},"0.1.4-20180808051145":{"name":"@atomist/sdm-local","version":"0.1.4-20180808051145","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"f8a2f7472e9ef6683babfc4972a7a3a634992c80","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808051145","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-vLDrtTQD1kkxR6O27eZuOtbJNYwJ/pYeU+BiHR8IgA3kBj+tQjlHgUf243acQ6gP7lQxudb35bw8LVIc46fdUQ==","shasum":"6b381e5bd3fb21466eaaf7ad36e93f0f35c1757e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808051145.tgz","fileCount":414,"unpackedSize":1249344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbanwWCRA9TVsSAnZWagAAW04P/2rKYQ73cE7JzOQp/UdO\nWme78IjXQtrwJdA0oTXJd8BQgrpy7it1dYuRvAbVUIBjpTSSeWq76V4X+AfZ\nRI7QfvN10L5O2DvnqTCAMDGbheyYPLEgtr1M0ZsfOu1QH+tT2bgA9GxExDjp\n7hHKz0LlMs19CBTGyC7vTJUj/QIl4GBQ3xIKBqHsU8AIQqfrH5iIcfI+SDwo\nRtjOP9vTLPZAIKKBpwJmhDFdAU6jo70M2CCBg4T/5ZoVZe5X3jvPWdp+t8+i\nWNNxUejDSm/lJcOfX5De9PgDwU9eH1ikNFhFXzVQXfheFJEjxZK3PucLOLE3\nUo2Z9LD4xn2DhAsD/lw7r9PhudodZE7jzzINKpSb280vLyEYN6dM7bbWNI87\noIrGx+6eIQk/DPu8tBCts3qUYBbVtbfdOXLEnkqI03rwXt9TUTeIb9drvEEX\n6dn0wJXVlhkC9kxQJAjFYn5Xl2mLuECFrx75k/38dZVEoNEsMLenPwW0yh70\ntlwRDnDmgATtZHARXEi9xVvywAu4hShpJ4xqJejXiB8FvAUIMK3CZ9SdQYGW\nHW3rAmHUvvPavZKixJyol5N7BfAr82NQqK276KvpPa6qaaeo0EALZJzyoV6D\nBi4FmkzCeY4QgmH1JyNt9PM/3l2qpbKkbaCW3o2YFYJYu4+d48stG3jZpATs\nRJf4\r\n=V2Rq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC+7u7FnIo20ky5CqG5F+DpNuMAaVWKv9puIRGea2oTFAiAEb26YLm3TBnNvZL2MvZZvJR+3cdaf+EWrn9djXWqPJg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808051145_1533705238208_0.5232400527080607"},"_hasShrinkwrap":false},"0.1.4-20180808060325":{"name":"@atomist/sdm-local","version":"0.1.4-20180808060325","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"bd837f0deaf36e0ed45dd1c9f32acaef56c6a256","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808060325","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-PLMzb/HnmLvXpbWRVopuGUBKo2eP/jDDZi5jjh3Z6cNONBCCapdlWxtcJWprI3nwLazIGp+HJGrefDfpXKa05g==","shasum":"2528cc1f9f57174460bf473a51cd960d47009b93","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808060325.tgz","fileCount":414,"unpackedSize":1252167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaoguCRA9TVsSAnZWagAARbwP/1vaTiryLgIorGU6O8Up\nPG/li87FY6Lkl5MnSk0GzRCwK0Xt/ifL87DbiYguEdNwPlFlkmotf+zwwh8R\nYkKvcbENfQTzrEoTvNm1MWTJQhWytmlJW59H+OzNYYpkeMCF4ggSfTe8ylfJ\nS0OKgWAhlq3M5gCIwqFQ5Dd18SAMEu1pZRAAQ73qUHl2ytk2FnbfzL/ESId5\n284qAfdaZoMTpK2GTZba8QwYpJmRCQ3Lu4PYe2muJUrZo/Ap2ak0wOHeSENJ\nQIby02H/DZHwRVdFQJfyjA/+DuKZS5ytCGnk9Fg72e/bbatDQ1nteki6Ul5Y\nRk6gEbNWpHjqI2WWIKDcnsuWOzErHRKhkMr2/ZWN0h6M+b0NkYStMxUK8TkE\nQpSKGxM1V532nb4gWA2k0j3SrZaoWTwWdl2PP06ZDQ3jaoFvGLtDaEjnmtou\npcDLm9I+/ZiK6bOUsyfiDnzuOKPufqbWnjFEonmSlb/2ygiv8w1JApIF9GpB\n2zox63XOISSrjmOEy/fYkBmiffiVrF7AdSlbIKtLAQaLx8MHQolACVkEs/c4\n72MX54BcE8eW1XFikSYENQeZd36i7yz1sZlOUhuCwYZQ1xLISe7mlopOqO/p\nUEnipzAF6Q4vi++YD/rCp+mzC0RYGmKjkXqOlmW5OWuirA0H71MhPc0ixjYC\nafg6\r\n=IMVP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBx2SjD/oW30bp63uDocN7fKB3tTybGU47mjMoUPRpfrAiBGV7qaWP1FE88zR4cgWyHGXUi7tA/nfqr6eq+l1s9olg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808060325_1533708334666_0.9580618873847615"},"_hasShrinkwrap":false},"0.1.4-20180808072312":{"name":"@atomist/sdm-local","version":"0.1.4-20180808072312","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"215660e1843e09b470349834366de29f0ae431e4","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808072312","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6YvMC99znCDShc1s97i41UfkzzaBjoTNreliKRCRHAUTr4lbOq6dYcNG62yowNSH5zHlP8RQxSDOnAM7q4mwUQ==","shasum":"460181ce5f0611ada38997716511c358166da1e1","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808072312.tgz","fileCount":393,"unpackedSize":1177141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaprcCRA9TVsSAnZWagAAKVUP/ji6GTU6Ag7ZRmpV+Ro1\ndlBY9nyT6A2JtEs2fL6NIvlHJo4NpS8aTZwzDwXz2a5KAw7+vxgpgWQRFY2E\nI2st0QfnuoeYWNxuxoR/JAJOCxrgnDR3s01snF0sWd8D/HyVfkobtS9Y55W/\nSuqkJXYg2moAj6ipQsBqYUzncYPfHZS/atWYN6FGYPHC+8/7DimWFFidUzi5\nvIttHQJzaQaTgtL5Xsjszg6zicadTwafTMn/BlVeE6y381aQ586d588heScy\n1ymI4clRPRWex1+B9iopCvSmrZyMvzHxPPFObNbYLWHMxMbN9772BHX8Srkr\nFwGv5u/r7JQrs6SEZvjbhiUJUtDTxAMFqQhZRIUZ6dI04oXoHeG6J+lZeLk3\ncSW/d6nlUfITWEycJoL1vcg1gMoEQT/KlMKGLftGfYSrVrYVzG0U2Pnml/RN\nhgTbRm8DVsBSH85/JGVKY8zQxLs95UYJQ6emdCeUgA0XPm4u2Ajxuz0A7AcV\nMAsFD/skd9CNJfPsiNbmezOg1pqnlIMy/5mloSfFZfa1wQaXAoy4eCahA6wf\nHEqcRhXUxhbkGwqpUxCrSiate2qCIdvAEDx8OBfhq1dlX5LXpITowgUWvl9I\n6GtA2BRPYmExGowyz30JUbLd1vnFZtKtuWh2+0LrCSaCz1vdYxi8p0MdKlMR\nVbUo\r\n=N7ci\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH0NYFIR67RddV3Kt6BmHzihVAwTXwePNACPwNK47L5AAiBhQGz+NRGQ11jPB1n8zmkiw3S+6BUM8Z/xXmXv5k2mlw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808072312_1533713116822_0.3867481555552035"},"_hasShrinkwrap":false},"0.1.4-20180808082615":{"name":"@atomist/sdm-local","version":"0.1.4-20180808082615","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"fadd7f0d1438e6a18d02e584d8af85a29936cdb3","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808082615","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-JWMMjlLcnaDQEg6xO04GF9EaXTKmvj/LqcoJ5onaJCggnGGPcRCfRNTA/VPK8U/oTc4Y8R8fmc6f2w7Su7rNLw==","shasum":"fb307826e429c0dcf647d4f90e9ce61cc220557a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808082615.tgz","fileCount":393,"unpackedSize":1175988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaqmvCRA9TVsSAnZWagAAqKoQAJnrFrJfatpztTYpxOXk\n/Bgv+0/n7FKfyrOEBTUpfeKrgUXvVAYqz69vQnv/9AEeliKQdZXY2510bmk+\nw5yTIQKGzJ0wBDnYfQ1OqgDYkNnq7mKvV9uP4eE0zakUjDgtfENKNrFyMctx\n/1S2Q1jOr5HOCWNsVvA3abbt43NhLR1ChcdJ7My21hnlQ9Cun24RgVd4TfXp\ngXWNX2GbzqYIsHcCiGfoR5+KXlCfOTQ6CHJ/6Wlvq0w0AMibMz3y4g+1cLlm\n5eKdNElEp4b/1wDWv0V7/TTJm/mQnNMvbKVT3sccG/etDoHYoGCmNzSnpy2P\nH5r4Jm7SZ5wdQGJwwE+0TawOgo3cYdKQ/1rSKZAm1GMQ5rw7Yz705KjxYmNF\nq/eW2xpGA+MiVesSNCFdQlNotGwLzQL/ws72xhX8W+rgaUMV/OItdzPiE8KP\nHlDg5C0r2bxbiN9ZieWCBGtghaSMcsge6Jkw+5Oa2KmoD0DNbXdb4mnQrLLl\nRAUcAoH4hA0wl8xYGMkyl63zOJKY5gy1NC7a/rTyJyhz3ZoGSxdaW1xlKMgd\nueHipoxqhwsPw9KAtwhC/rwmrRX3E6SY2v1waTnZlMadLodXH6CcpmmJrYhr\n+ATxaatILtTb0mqinVb8kj+Qxx9GlMYhnx24C8ZMMtfJDk/P7nqMXIsFICGM\nsEvY\r\n=v5Ti\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFs6CX0H3TwXbX2z8ep+l0oKDhgR7fiIlGsZGbnOxqgMAiByZokxhmtitxxD0ZPC8f5YsKybmtFpfCgIAA6BDxFnHw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808082615_1533716911243_0.6702711187369244"},"_hasShrinkwrap":false},"0.1.4-20180808083322":{"name":"@atomist/sdm-local","version":"0.1.4-20180808083322","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"ade59a23ce2b25c406ce32f9fbab3df4cb556006","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808083322","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-se3U7Qq4GCHx5azw38FmurSrhkoF9ARO8BmPUqa7r3knLH0uJcWpePRSBe6Ti+PXw3nTIUCQ63d7lT+chKrOFw==","shasum":"d52df53d3a16cf6325566ef7a444744bc25ee946","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808083322.tgz","fileCount":393,"unpackedSize":1176388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaqtPCRA9TVsSAnZWagAAf+IP/2qaijPF3wiZpbHXi6NW\n2pVFxxUA2JQyb1UYnpN1iKs0OoHfg/I0p5ecgVOd6W2xXZv82scpFWgtUxYH\nFbLTARwHjpua/N4bRA8HKK5AxFLKrnSKZUJ8Ekzqw5MkRGZ6rhSFqDVIYo1B\ny0e60wq1xLFWVhGGNA9j9qqaMz1NPaPlrX0inMu7qfA5zzqUxBJ+GM0gGN0+\nBRw/2lyLcLqUp4Ztr5ewhlbnyxb6liRH5JMhk5lJCbULa7jD7K06EpLlDkaz\nfPbBtkraTVddhPKI0Q1inRTqVIS3ZDEmuv3Su89q1YsyoghrEWFH2p6wto3T\nw9WsccQnCM1C5ju5XR6U9cEDySb89KyuzfS29hmR3QNcfVqH1a2wMVIIN8sQ\nKS0JGfv435jov1KV4YqhnkSRhXOgKcrKQzAGb72S2LBMTf3BsBoLjLA4usAy\nKevPc7g37ckpj2OCGopq1TbjcPUYzm/rfrZus1YFp6GewVNrGNGgL+5spzXN\nul01qeNAJ65OeQq3K221jBs/cstbkcj8nNlb386G1yEJSNA2UfxA0rXozzm+\ngiKlsepaNEbYLNNU9xlV4y1CxN7la7SBXjRyLqKyGvwIRh8RKvR8P7tBveEf\nkDoquSSjQWR9vWCe0AvlsGGlRLUyLVP/jg8lTYZGlDBOwwY66uaEM/YXZywY\naR5N\r\n=8p1D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9j3sBp5Rkl0JkbbeFEWus/ndkWAoIBM2yKB3ifmWtkQIgIvI8UpNjt7ch5Li0xhDU79moJ7LmUwUEOOlGgq/HrgQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808083322_1533717326957_0.9749461333299072"},"_hasShrinkwrap":false},"0.1.4-20180808111915":{"name":"@atomist/sdm-local","version":"0.1.4-20180808111915","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0eb3285d6d6b7c49245e406383b091bbd3172111","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.4-20180808111915","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-o4JSpjARsYQM/xCw/H1R8QdW3EB5zysXRIyiLm+PsrZp/6jXMmNIyn2d71+1S2dIb6zicwwrq6PGZCEPRqEyMw==","shasum":"0cf403580bc260d202ff177f57f57114bf97eb4d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4-20180808111915.tgz","fileCount":298,"unpackedSize":933767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbatIuCRA9TVsSAnZWagAAQawP/j9E0MlmkwYIT+Yglmf1\n1J3OTA6FeasVbrYnH877bdJ7RNAbFMo6hIApuaMWOjf3D8PTUQ83g2vAqAs7\njv8mMhsvQwBrVSfuGAR1lg9fs2tz0ErgmfzjtQjjU2eRPwcAp6es1WU/8opM\ni30tQL2GpM9VRfkDFYV213uqjHZ4fdNWgoOzrdAes0vT5Nluzdu4dRQvp1iX\nVu3b3uXjvmVafquYoa8rrX5MR/ooVVxGiFMUmTFmQNwYJEOP9eATIdIO3/GN\nEtcPDKlJqf/MrWiLoJpHNIx70hdSwVi9TcEYKf14obQ6Ook+AYnwY+nkxltn\nKmtPaSAq0BhytPJ3q/TMvwUm3qiXSJjDduqNbAVIFDu3b5aCmqp/W4A+gTik\nIG4Ao++x7b4ILSNeiwd3SZhA+wC4Oud7ODPumqYiCNvZggVeoYJhY/M7pcEs\nBMCzemrt43AEOs+5vu32bDIF3A86ydmXbsqyhYcfEErxnuuxa49ZwThl36R8\n/38DJFzNTWedTZ7UbBYHdErq/8C2BOLgjA6HF4CUle8pmZ2WooXQg7SwFSb+\noQIoSrjmZxvS3U3aoZipBq/OEiZ7UrPyrieDYTRRabRmOZHz14G9JWs/TlQG\nHI8SQbgxCe2AjYmJTIOYHTQnFQT61Gq8erW5J86/tmrGnNZ0IE8VjW0O0hP+\nphL7\r\n=98GV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBah15CZcxrntgvbSANZKZnleDhsOKxIIxLXYoaWAAXlAiBP5moaCB0LylN8gxyqxm+Dk9s5FWKx1OuHutKDbh/1rQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4-20180808111915_1533727277977_0.3572797208409364"},"_hasShrinkwrap":false},"0.1.4":{"name":"@atomist/sdm-local","version":"0.1.4","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out typedoc ."},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"0eb3285d6d6b7c49245e406383b091bbd3172111","_id":"@atomist/sdm-local@0.1.4","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ElK7Z0Jle6EA6OUGaWNzoTSYAWFj3wlCiXSId1kASEZXklHFvLSDsW98tPwS2/7snmWFVUXNUr+iElqFXUh9xw==","shasum":"87a202f0eec3a9f85059d3ca00329f40f971b869","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.4.tgz","fileCount":298,"unpackedSize":933752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbatLZCRA9TVsSAnZWagAAFkkQAJy3111Z4YQ6nof2gILt\nVIRIOzoLhFrupRbtblAbRwqty0nywi6MdFl5rU9q9WOOQqVbYlFMX/KJ8vpY\nW9nPx3zyQQNNMOHK0F8G20ZtV9xKsDixY4hxnTpCOJ63/ZdibGQlcpY83Nct\nxlxL2dwQRYMTg/ALHfkjWRUJGbKPxAmWGrHHIWaHTWJKkvqKBItOfnaF4+Xs\nwHKCIWQYR+vdChi0n1sk63PB8bgal8N4xY9PfkNN0DfJuXIhjRGbyAeVSaY4\nA5VmB5x8UlkvssoTKI2YD5k77T3e8ibZw+06Gs1RhN0OQRHoHUkPuXzySqwR\nry/7gLvTp4LutN1+Kdxa+7e9Zk3wejD3AisJoEysvTm0dyfD9zdUvXgQexmF\noSMMb5kz5kDRpbGSn96USA51hYpXTs0Pir3KNGc4hVKLfZbJ8gaQL/X0JtLj\nK8iE1i+FYFlziJCEDDYk7apNvqXjSKOqiVPhwnqfsGzicATX0g1u00/XT7xy\nNRzqkw+WbPNO+KOPwnXKphrJ/GzRj9jSU5lD/ZPoF4OSGLBc4RfBArTrUbTP\nbOTKpmLRtkfzxtmEZSNNSdJ1Cs6nHRbqpaSYyHFyqAbD6BzxZn4kT1UM1ppz\nCEUEWw3eaoOIfLwW1whbJGQ6UO27ylZOYFfvCl4mDO5ZWuSU8zxPxF8EEHAU\nu+uP\r\n=QApf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHf2tulssPLDvD6evgfQfP8XI2jofICrMzpp8cv7poCuAiEA4BEfm64/X851hvDI/CdLkRaF0hb/VhcaRQztawnIq5I="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.4_1533727449784_0.012316048079793696"},"_hasShrinkwrap":false},"0.1.5-20180808114734":{"name":"@atomist/sdm-local","version":"0.1.5-20180808114734","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"90315a8064289635abe6c17736b7b334de9dc53a","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.5-20180808114734","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-tiB0WrI5W8Ye7z9GsBPspvVenKbWjVi4Q5LiAm+4qTYxRC+CyuxmVKukNtMjP63vI6qU6ypizAZ/DCrb5lW7Ng==","shasum":"becd1984f0b67140db80c3204a7f74ddb521fe4b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.5-20180808114734.tgz","fileCount":299,"unpackedSize":936315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbatjvCRA9TVsSAnZWagAAdPAP/3YhuCbSV0WAT3SyX+0c\nX3EbnAjD+56KuZizdIJxdCYP5rwwPsbX/AiFLrZhGrLGwgQDcYz70VIKAMxb\nJ1dmGbPw/wz41zY3lEDjdPNfpJsOR7HlFa+gRvJtNVzU+52vPsDossv7UVEP\nsLenv5bwZRGR/9kkfeVnrAESxeL2nBiKDgVsqSGkKOUy55ypfMXmVIUif7At\nUOoNL7dCKsFKZ58n7mp9NrHxFevGzLQk/3bPfmyvajkDV/EuneW5LUSKe+GI\ny29/eiFc1vv5/TEtAvp6y0Q2esJrreFk7L8/JpVjRqhlJDehXR99fGre4Oib\n1mm07UkpM5M9lOudYmnT4+Iw561diKZvxZIbTYR4ydP03Gjjgl2YWXcqplLo\nOk2KNs8Yu9x6APbRzu7fO8hC7oYdejwt6DGgjcnfBg0uMg0eizNyPAHJeA9k\nMCP0r2LWQ6QMAXCHjhHwc183b/Ow3aSmQnZGHzokOvLunfT9sRd+rxVYzvBA\nAB4ENj3xksW/B6CQSLkMIv33edcN6XnhEtc2Cn4t2T9PcJI8Fi4Paezu0t0O\nFY8dMacZ5olrp8iKFYYnAObMkxeBntoEVipL86EhddMMGws0e0qSrNSTmbRZ\nke1tg83u/6HCtD91CO4VDvXCOQGB8cUbY5TeCidi5ROKr8M2oCwx9VkRUQzl\nnbiJ\r\n=bc6+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4eFO0mKSO91K0TUPNV5POoDvyjQRVNgQY5mOZG4vOfQIhAMyr6/2rS8GfASEoewYLKYXkD6F3HusFFsh0DIz9jpiZ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.5-20180808114734_1533729006352_0.6254894373442368"},"_hasShrinkwrap":false},"0.1.5-20180809001215":{"name":"@atomist/sdm-local","version":"0.1.5-20180809001215","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"9e99ffd849ea8638bc5b88a05f7f69d1dd32bc9e","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.5-20180809001215","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-zCCUDBzZ6rQUz7jGtGtvnIsYxJmJzh4AFICGs0pkmfjevTBy3b0VcHSjzuvtZPczb+J94FCw/+/ySMgYsSfLqw==","shasum":"832e08d9110b2bcdcc1294879aaa90afeb3194ff","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.5-20180809001215.tgz","fileCount":300,"unpackedSize":937465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJba4dOCRA9TVsSAnZWagAAftMP/AhlJuYgiO7neYELCCFQ\nLWiASmHX0LIcdfSEwFpyUH7J/OtWp5zC+5CwVpIXlpkQ2CHjKMX+9Zdv0oIN\n/oYj22UiZf26mYSBiZSVBT3kD1I+QMXM8xHdgu1OarmQKb6nS1mBxk81+plV\n9VvIdm6raYJcVuL+LBVvCdtAVjMpyMSTU1FwoxQ+PZcFX02sOQpgzdaUi7QZ\nNTDJCN9KN0LTiFMzCdakWXbTP/Bi876Zto5V9/R8N20xqEN/aGPfpCv8lD/t\nkmqgebXB6e+84Du9O/chMWb/KuRA3WdH4s6OJEadpY4fmGUCW3HGaHbrXT8J\neqeFYRRzEEE2svMKRrSOYmJ1kLMWt/968ziKrfZqnaynZja7+fvdMJnThjgn\nHSnX5IwE0nOc0vmm97/FhulC8c9JAF4o5Xm3EkBQBwWmOdmhCGeGg3hpT8nJ\nLzm8hY2rNiPie0130foxBD4OLeEpRN4rnIsloCrYN5TkC5Vw4kOf5b94m738\noyvgWcG90bvu2oC+qh0yUPETEJ3x6JUtfhf9FAuEesD3mbACj6n3p9oNpXo3\nj+RpUsiC+GgEECt8ExpkEPLXWkafYqNN7GbJT1jMlpVsUi5/ODGNnZp2L0H8\nH7UgZPQKVxSShD7iVpF+SpdS46LuZWPGUKHSAA2yQRNbsSivAQ4KoJNzOVzd\n2ogV\r\n=lmpD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqtA2RBGevz0i2yGnivgCBNqRqZnWsPautQ0l2iFAUqQIhALOjZODqye3H7x+WHEu1zB/qjhGNafWmpp/PALD003+N"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.5-20180809001215_1533773645897_0.5576865734235308"},"_hasShrinkwrap":false},"0.1.5-20180809012033":{"name":"@atomist/sdm-local","version":"0.1.5-20180809012033","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"9060d14954f9af8066c06f0ab98745edf38a28c1","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.5-20180809012033","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-uc/bW2OBQsbeaNOY4QvacSsf0fj3hI7x83DBIgNkKaWELvVIsCR09rJUQP27YcwLrQfaxLwHFCwACvSfrF9UmQ==","shasum":"d1fc31fd8b0fe39d19b06bf7e251bfdde14fd204","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.5-20180809012033.tgz","fileCount":309,"unpackedSize":942277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJba5drCRA9TVsSAnZWagAA8F4P/RZL5VvdF57yzESmNfEM\nEmkVFTLpG5H8Z78hYbJtXO6Gf2oQlG1BGRT+3BpIlk1F3xl+xIPC9VTQOBB0\nj/++V8YS9cJ9ZbT0vNEuJGz7Y+rv/ZxQHArVXFbNBKKuld/yRRNLZy6Z2ekY\nfLs+ArYW/iHfiv2JsrocV2hPppUU8iXJV/pCk9Jc5+2IiX9niXkQwVUFOBeb\nl6hEUgI/X8Ocn9LZO/kOzIMnbye8GT4Up06UKMUo/8Tsu+Pox2cAYUh0tRRT\nMGSiJJMU6aCmmmDIQR0PjDya5lqkQIVv+3zM/h/kVXTtZOyB5O3SCHg2wlBc\nBgtLnJM70IcMvkmIDX0Ngt0uQFqYE1LpSN+3CEUGfyZo9peY73nvimuJ/d9f\nQOi+0mleNDMT7/ETyYa2qijSaxEU3zqqIrd9zIGbMXPgY0uKSQPZ72u6viLc\n4wnyRdvL4KNrpX/ZCKh2Qo/G/pDHvVcY1mEMuekxzO14KpdX70RmE+72gjmG\nV+XE6fmbiaK5TA6/vm/7AdqWkaIzc2v9JB3WqzmRHTjm3GXTAdqw+2EuBl9y\nCcjy49TrjEkwlDLF84370ubSLmb+0bcEW5C1k/9i/L5oerVeGPNVapMfwt5/\nHWxjNbGLwRTK2X6CE3X8EqWfsKBdb5/NCv74mFiJptMTd1LzaolrsVoRUCuC\nbBpy\r\n=lIM1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsgxJAEhApDJi1HT1MTgm2srmUigcxQ9wSW57JdJ7rnwIgEPBKw5VpT6INDygYSHROMCa4cRLPm7z0pRipZbBcV08="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.5-20180809012033_1533777771433_0.19558866182598078"},"_hasShrinkwrap":false},"0.1.5-20180809012331":{"name":"@atomist/sdm-local","version":"0.1.5-20180809012331","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"8575b9af2206182eda4bc487d9bb4ad5f4d6753d","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.5-20180809012331","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-XsVN94x+i8SnGk6A8JcF7WQ/V5pI4Tu5qt8EimW04sctOJ4OvuaT+knif/Fc563Re3PY6BIaGYWrkcLEMhPPoA==","shasum":"849f73f5513049089d21b61c1e92fab4246b8f06","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.5-20180809012331.tgz","fileCount":303,"unpackedSize":933739,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJba5gcCRA9TVsSAnZWagAA81EQAJnf/AQofv/+QyPLc7zp\n0PDjYgLD3dvo00sdTVe5kWAqR/pCtuZG8n8b/tGiOjORQ0jhNnzmOlc+U1wN\nmNxZp0EPkQol+VjYNa12Fs2NYSMe3OgYjm/G8ac59WzjYkpcjlYz4JYmImgG\nUqObDh/6cqU67Hr9iNv9t7o9zhdjvJYVgEdvHDhm/Um7Bfmy0wMOY8k/HImd\nypljv6IOI3Wul4u7+pMM69LY9fLX8NbUgyk2xmsluMj2z/LCzdNpKRP+0KL9\nNzM3xJtYSAmRoPj8tyJN6t30p+XdO6LV1XESVeUyQZ8f0/2tJNSASbVfXPZJ\nT8aJftO95iFPkvyUigGDQWc1fh6U+17LFrPTh1fBaljfvEELmvMBHEYS3jgM\nE/S4gl3xLsuIzGAEE4Tw9kpXxJKg0SbcmRsRjqiLaDbEUGSUiWmTPbVxNl4v\nLfKofdBfBnvjBMl2D2wJZIuQF+Twn9xvEeBkvLoP1k8ZtOk1bHLb0p/MfoWJ\nRed76heocT70hGSdmgouQzF73EE90KvCu21JTBpkcpsUdE/1W22iM6FrCw4+\nNQy9Tj+MqwwKwZLzrvetEwex0TQ6x+55aGwTNb/X9gq+0VecTvuxJka+xkqS\nQ30WAdJTmyOI/HflrqknlGZSZU/6yaIdFQwpAlMteK7g6Mid372LPAYwoLcZ\nQQpf\r\n=r8hp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXRibH2p6WuBsGsQ8IrV6GOb/zbqogNcu6lERgGj2rjQIhAM+ES1P3GO83EcetE3LvFlvuK7wC1P2/kZmSYpW4mN+W"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.5-20180809012331_1533777947936_0.3623090928141688"},"_hasShrinkwrap":false},"0.1.5-20180809015135":{"name":"@atomist/sdm-local","version":"0.1.5-20180809015135","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"2fb00132b1e515fbdad5e126aa3b760ec86bf2f6","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.5-20180809015135","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-7H7HIj9kvyMqcao1SsEd7dDPIkihLqtI3NkncaQp82C4280U9yTr8bpLCNVcdP8qKx4WxuYvPS3tRtHDQ8/8iQ==","shasum":"ce50dbc5288c779cdd76fc806152342c6af313fe","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.5-20180809015135.tgz","fileCount":303,"unpackedSize":934568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJba56wCRA9TVsSAnZWagAA6iQP/RoTkSWhqVLXQTuqwKwu\nplYBlxdBzgd4ZZUPlcPdUDaneyeZz8tdeS6IUem6TVf+33Cc1fN9PmF4WsNr\nqeXS7M6QlQ6q5x9UFKM1kqHBgqtS8b7zWQbWvRczovd1QLibKLNK4ZMII0fb\n6V5JX073T5mV2HjkUy2oxGa4u/mPZKVkuy6M7n3U+qwWx6BhVjLF6jubgGZ6\nQS50TK2lovTpLSTEBADp1OtevKpdNHfn+f8pP3fGqeSnvo9RpAWXWzrXqyxO\nz8XgZqHoU04BKlSo//wJTwMEvPzQJm+wd+IPCouKDfRwor/NsJL1VgSJW/lo\nD5n5r8Z9avjtN/RusAPcC+u5dG659zFDEbRPg3dRmtGYxFbnSs0w75UnzA12\nqOzzkPwhxRlVtrB3MuRiYluek58vjQsUeh5RFO+8Wq7YUF8a64c/KOptrgCe\nwy8Rol7es+9p1et3JMdYls+g+rUu3jq3hiNNOaCvxFtCZo+c19AxTwvNgS4o\n9Wi3gKY/G0J5XlyRXEPNmuxpAaR2RTI+MpanQ6zb/OMTuLQ9TopgD5FA8ilq\nQW+XLjDmrjplsyjuNAw/ndz5wuhHRd+7NnLtVNkDZA1VQJbjbEYfgIMXHj/v\nGZ1WyXMj9rlTxPuoTyXt0WTYBSeYCyUXrtHZRjW3ZAP1IIefJqez2e3FxUUE\ndjqB\r\n=KI82\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZOhPWLldnSx7TjQ6gO6CDcDvPYBAFig70FhwNOFjbUAiBuisgN6UnAd1SFZKTN10zGsYOnCGbKyzQJ2ODrLEhd4g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.5-20180809015135_1533779632255_0.5417557598470986"},"_hasShrinkwrap":false},"0.1.5-20180809023752":{"name":"@atomist/sdm-local","version":"0.1.5-20180809023752","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"2d2ac4d05e55bdfbe185847da1e02773a89c873e","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.5-20180809023752","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-w2kALsE60hq5cAbcNXXWR/QV7Rf/8titQAfX7SGj0Bx1JoVhhWhOPv0N1+usCRaXlcHLume2a/vjkBjL+8U92Q==","shasum":"fcc66aedbbc6c0a6c6b6c23531a230fe1d30b8e6","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.5-20180809023752.tgz","fileCount":303,"unpackedSize":934985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJba6lmCRA9TVsSAnZWagAAVWsP/17nV2Ymji97TZvHL8k6\nplkYreO0q7Y2U0SkBgEE/vyLc9eSuGoGrIdwcBICJfgt6FurFQ/vHCOQrEh9\nM4Um/TbGwccnuHsIMccWSNgHsjP5JLfT0qJzyjWSpSUHTHe17bXmYpKmWq3j\nc4WghxGge8IkttsWeagyEoq+8NmYZCRlrdWG4hGma0jejkLCCDpNI2wy3iBT\nOk17uVSMdAzMhiMwfmUa4DGQ6ZM3T6ZWZ27QAfdl0Sg5Myd/k/Ls4bjWMajN\noTvKg0RXtwTQORbmvHPeuhPyjKmgaa4cPB2O82Ed7l2UpdkjsZkDber6/pvy\n/DwU9k12Lbm25Bnffs9h+hqstUgBv4msaz/VtZQfCyzqAXe0ZjIk0vgbYr7Z\nTLhNEBvYTnnzATbN4UquyKsji3x4rK8eG87WSnt11HipdXH4E/6JnblDckcY\nAZCxVXvSR+HMrVJhBE6eiV2YtTB98VDGqyHqNMMv96d0qNW9DsTnihKCJJGg\noN+OhTZMA8B98yDWotMBBX4i1IcbFhHfV6GFcEscZV0dErukchMaXKINZAK4\nPfXc415X9hoMhhtpIw5XqAPQ3yWGSXTgnz8S1XGi+vnxPZQwTG+rJ1RAOZJz\nyyeb5S725kHagKba5c96eYszwi1yOdMWUP0RpUWG8JXT6VB3bgResM2t0NbK\nxqNt\r\n=RVMZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzAjOOLhQArYciVRnsyo5dPktCdZ+r4ZpWDqVgmogV7QIgJNOJQRbtUPzRxqEJfW0JOKfkQQHiKWyBjx23D4gq6vM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.5-20180809023752_1533782373735_0.2544352700335133"},"_hasShrinkwrap":false},"0.1.5-20180809125849":{"name":"@atomist/sdm-local","version":"0.1.5-20180809125849","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"0ea72cb2899cc148f9ff151e7f5ab245c8a9d0f9","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.5-20180809125849","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-xRyLTgFzjklBbT+t1xnRUm4VaTN4zH3k9VfuCc2CbeeU5SMbatUiqotZPh92u/7EmBEOXrJTVfthB+dezzXrFA==","shasum":"2e6a6a5a1c1c445f69290e603685c4317423555b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.5-20180809125849.tgz","fileCount":303,"unpackedSize":934679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbDsaCRA9TVsSAnZWagAADz8P/3wIf2RUhlvRjVXjA0Fy\nihfy25C/z54m6ZDjaHmOTTnxWY6xkd47Y4oNK9sa363ooR5vtf3saA/EeKw8\nWk3BSoJIOpOYYmv5bzo4zWp3S/6iFMILgUtp94PVvsUTu+sqg7YW7wTfewWk\nO+fPvt717vheWl6aBOIrb7ketoihtIpkFhvYq3IEfc2wRfxMNZipU53fdWRx\n0TvVaNP2Z/4CesKmz657FHu+4tn/vk/V4V3di1s0ehyVo2tYezPvwp1SW0y2\nCMPe8FtsSvDAZbTEUhvrIR+A7WkdYMtd6dXxxtkhUZwhEfhEutWhTbNFdhuW\nlXDvQ5JSYArwrXIfE1brC/hkLdwVONyhZeHZ0oZ78gKs1pxgc61Q6EhJOvyT\nDcBNezW7+0bQzpRbk4upZafzUC1Ce2aaHU+5P+sWm6T9RuW0MJWi2o51zaef\n0hcojkwMRL+HeYIM1g1VrW+Kbc9ubQf65K+CA5y30MXCePe8//leXILNsEHu\nuqScMLrdY+AoJuFd4qVDpfawczpdvVA3QAhNAztHEsuYlEm9qL1kaZwine1Q\nsldUgTK0n5miyv1QTHp1qsCQZtQ+xL2vOQWBuLWMFJqnRTm+cKmtl0IHHOYS\njlQM27bs4zb3/nXa4GRCt001bm+BPzaZghd+oI1Jhg1GwqUCnNP9S5vuOSzD\ncFdq\r\n=qFI0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4fDNb0XhJgQIUb9XPfrM+5KbGVeNWRNLwS21/0hn58AIhALaITDLneync+DVuJ6304DPqLOc8p34U5F4ZOHTL0HJ7"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.5-20180809125849_1533819674178_0.820709108098747"},"_hasShrinkwrap":false},"0.1.5-20180809144833":{"name":"@atomist/sdm-local","version":"0.1.5-20180809144833","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"e1d995fdb3b2e665c256adb09c0e5de282e9f202","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.5-20180809144833","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-3EwHotrSXudEdLTZ3zWpH2MBJ1pko1zrK+N/IDpkItqd8q81LxCdfk1KOUcb2olFqkTXajXhRmOIil+ZbVmWrw==","shasum":"8affc14f7792c87b55c2dc5503cebcd1039af510","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.5-20180809144833.tgz","fileCount":304,"unpackedSize":935561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbFTQCRA9TVsSAnZWagAASqgP/j6XTV6WtopFE8ozWURO\nddhN0VgQPQ2LRf8mc2mXCuvudJSzNs5jX3wv7PyRYcKDolHdRgZqj305vHm8\nV3fYXPb7HvOoDqp+/jcMAy+wtbpkGisH25fje6rJLrZ8sIglNjFeYAsv4iCh\n4QdBVJnfcMgUD1Uz/NznprhhyCwvYPybmp4Yr6BehssQ4JNA+TW6yr44YLW6\nXi3f5C8A4YSy4xkiY5FnPEj5Wmb0nHu8hRSWTAbtLLeBmMQMYz0rzJEs5MDA\nGXnESNMhIyXX++UehPuxuRubhnlIR8veO7PMoiOPX/+ZkDa+nxmyfEoxQZ1r\n2Jt/vBTzfu3FvhaG5CVJs2E3GAgjQIHkNCb6ztNt8qC9n/wOfUW+/b7qoWwD\naRCa8zh8Yqe75cSR0rOA6U5ViqhNSuaJ/owOP6q8zDOdfHm/NYhKK+8Uwah2\nuVqsR6VogKk34+NoJW3dOE8Xr8xglOI9f3Elqb4A/Nu2XVWlHC+jOql+zlED\n/r9DhY0zLrdNfeWKFN0vkO3DBoTpq15fg8umTU9ZuQVTWo6llRFAiIcw37In\nAVRACZfXVLvG3tK/H9QOPH5YXo4dVeJC7hnX3gKTA/M/gB+EhspNGXkxGsMx\nrNNKVltJXRiDvZR9uDc2D6u5RCRY6NzjsuEwWA4YOz5wdaz0gSh0+kBnsxo9\nsDAJ\r\n=omQ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiADUcEP+9BTWHM1JKKEPPQqtgmZDYaih1Jt8yDwssGgIhAM+L1cKFb3/RwXNUfe/wzgG0Bxq2R2nx02MnVoIXk0nY"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.5-20180809144833_1533826256462_0.4797355949187625"},"_hasShrinkwrap":false},"0.1.5":{"name":"@atomist/sdm-local","version":"0.1.5","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"e1d995fdb3b2e665c256adb09c0e5de282e9f202","_id":"@atomist/sdm-local@0.1.5","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-gAyPfDCg4UgSgFCRS5gD8Era83w0xbfBXp4irh3IJ1Kf7wQ2Y/qCQnnpJXgSqHKty7MUD/WK+G5j2hAbfLLnzA==","shasum":"ed5aa4df7ce8a27f045123c13fcc0b74fc05943b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.5.tgz","fileCount":304,"unpackedSize":935546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbFVvCRA9TVsSAnZWagAArdgQAI8COnpcZK6/u38z+AN/\nh4wVj2XX+LkTGy3YIYFB39CCj2PaQRr0VxM3HgsbIkgdyu/7a8vSBjaKBy0n\nyse1pseYEQAKctBZzmYguZnOaYdBFKA69sFnL2wonNN2RvfVbkeqEaoasQu+\neDfIK9B4jedABSf2wRnWkXuCejmuuoXgCMJvXiO04mlW58SLB2vqFdeGZyXE\ny6NyYt5ddhy9sgYUlfTFTu9+1yUsgvI+MpPTGF1kmpJ0nAuYYZC/wXxVVd0D\nnyB36axVaP5mFVJkc5jHTih+u7mvVJMn8b40Ny5PUbe0eSvq9gArMrl7v/Gg\n5CL+kLFjrCd8gjISDN/bfT19mub8596WNk77lNFzeTBuYHj/KoU5Blh6miU4\ne8r9bbGuRjfSZOoaeGD9x3drJwEbsGwyNLssOaHTjfWUM51ns4eugWWLpv7k\nsdCf4WZrxyfeld/jI2YxXDpSFO89ufEic3yHZnzw3+KoSqvChpyfbKIRUaUs\nylW/Si2vyLNU7MolUb1IyqQEBRw4M6a5sh2x9w/Ulv23xLfkit8pLNVbs5EF\nxF5svqwXGCgfbZxFOR8257RiNueDm2Pxf04i5iKX6BEyw5lZEmRqdsak4Nzn\ntsV8YJaEtUB9m5VxM8s97Jz9Vq3jrT6lmSeWOwOV+Zy0FrI1pvS8fy4aPX6P\nD+zS\r\n=YMgH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTNwKKVF2TNY9VVp7J8ClUvIvuuFuqW2TnJM7cfAckrAiBVJga+eVilW1Y31P4O8VSgP7AABCDvl9fsvgpiv8J84A=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.5_1533826414503_0.6010893095757908"},"_hasShrinkwrap":false},"0.1.6-20180809145444":{"name":"@atomist/sdm-local","version":"0.1.6-20180809145444","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"3e5da8dba20cdea48c9697ad84cec003f56232e5","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.6-20180809145444","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-PGSZziFdt9S6+/Rc7Lle9qjF1qMlZNY1deI6ZKS+UVA13wNXM/zVGz+UdLNMLK7eaakOKpQ1R5kxSAmg3CLOTA==","shasum":"6e2922ca5dd7fdc19d4369454263abd267f3b4f4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.6-20180809145444.tgz","fileCount":304,"unpackedSize":935640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbFZHCRA9TVsSAnZWagAAO5oP/0oYpIcZksPxNqbeT/0k\nhhNDkR99Uww5Zs6tAGajxuJq66j7KT8p257gtom68SCoIHgFxRdwVcAZwqzG\nRVTY84bmrDYCo2QIGsWpKOIrwotFy7LJZbs1Jmjo72yXjxqR9PVoTKipRPtn\noh3wj79qGR39/4WllyzuGUl3g8v8JiSOFKIqp4lEEuteP6A23YjWhqCuQKbR\n6x4vBcJaTKZjky4BYkJpZ7ZLuyy3n4fkvH9MshHGIRGYPK6nG2Jp4hOdODJ1\nI1BvTJ0apWKLBAOLGUQk4qyyS3HSBJ3TOWgCBZyvZGaTNEzDXbZpr6vwyjae\nV60dgKspfVM60uhZfRLaDGYvz0wupY9HSNgUIydbwazabbu11KQC0g/L5YkB\nGA5OlWMA88+3Om89Lu0zPfy+KDfqrdpBJ8Ao96d2Jlkh1V+Wso+1DdU/ZO0g\npZih7MjnS/Giwo4rlfimOO2bQpvIGcL23CD1REd+1T7hysp7rue1jw75uqI4\nkB5I5fJxpwCyVzdehRHSQ/7VYtiWPfXlGNqVfVmZZghehUyMv76sqencym07\nToSpl5B3evY3O2ft1aE2noAo1I7aQw8wJLQ5BoAX0QcmnEVc9vVvr0NJl36D\njdRF1W06OteRY96gzoY8z2k6hUzcaNLYtLqphVft9wodvaU3Re3UtOVf2ReZ\nHlTq\r\n=8mHg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAqyeyT6ggVhU1VT02tEcLFKgdIlajYkVZQgyyYcavCdAiBvMUzsvoqxtl68gkf2jF2lFYkMbn5VSYRJRQCfDmb8DA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.6-20180809145444_1533826630906_0.13116609385039313"},"_hasShrinkwrap":false},"0.1.6-20180809153252":{"name":"@atomist/sdm-local","version":"0.1.6-20180809153252","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"49b5da10724d852ac55d8178e8b56fbeb5ef853c","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.6-20180809153252","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-F1/nrCb+5hHZWhAr1LSuz9w364dCzBP+63CHK6KsVfc+tSmYZazronK1tqka/r+QbdLXeR9XjMQ++VPVph/qhQ==","shasum":"1784b672e64b643cdd198aff54877b8f8b7dcd7d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.6-20180809153252.tgz","fileCount":311,"unpackedSize":941481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbF8SCRA9TVsSAnZWagAAvQ0P/i1aZrIJX2S2UD2JzR4K\n+qD9AMnOBhWukNA6cP4sSGsJsnJY0VNYSlFgt7eidVPDAtwu8CoXt7swdu3m\neteuMEC3kdLjfNZIC8aaSVOos95KQ22mW4uJ3ASiFrXxQ3WVa/8OJVhargyR\nkKfmPC1u4Y/MXWer8EdOJ5hDWi3Nz6Npn8UWHshxKI9KzMuWuLW/kHFNmHYJ\n8Tk12xxoIfwqsCkHKQ3i/eLD766lx+1Hgml5fonxw3S/DLfOJYtMZLmlHaIL\nBXjTg1eI4Ne1vS+30R1BtIwCr+WF/Xyz7uh9KtHm1lvng9ehtbXGpNmz0/yg\nOz0GHx80ZgdWeEUAWwcyaeKxG0FoiLGu/zVG5iMuevkovVxN7Z38K75qbMFo\nsklINC8aXnfnUAak0ZBui/tA3SdBK3UN1bShEGRWVO5piSCefj02aUeVUGSN\nCZlql9OBhY8kAzB133XVZJTVWrFhS8YaOlzZo1+4CBULLKZcaQMwKVV7m3SK\nw9AHC4VZlcQVvjkAW77I+nTW89t/J5C8rSpaWNpDTQD/88p7ayaCX6XXrYWh\nhGYQx59gYUNlw6+5lM8/wGFlXBC4NQPoVJ8Kf5volxU9UAFbpSCBhu1opipS\nxVh009qjk4OvJ4s+Xxnbm37Sd766WLiTT6iJj8Ud1y3D0yKkSmYlaKjKw7sI\nxjKa\r\n=3X+E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDF+B59tSW+0E16OUOZpwfH5iH2zIrkO2sW9L1dKYM+hgIhAIJXtW1cLVoFeJTRoxwDFWyqqQ+PRAqKJuJrBz8NVb+r"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.6-20180809153252_1533828881944_0.09449565950393324"},"_hasShrinkwrap":false},"0.1.6-20180809163830":{"name":"@atomist/sdm-local","version":"0.1.6-20180809163830","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"a2067af24a4d00bc4fb380e0e729fcd100c01725","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.6-20180809163830","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-x9iUU8asgYBHIfd4p9PgJT+CPeweu8V06jx+w+B8c0zJpZl+T2/lUjXy780JCeGM+goO7/ujfQ+iO2+vPgO7Xw==","shasum":"21e0b911f2c58227da7687d4e8482fd3e21dd01a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.6-20180809163830.tgz","fileCount":314,"unpackedSize":944217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbG56CRA9TVsSAnZWagAABlQP/0xF018O7pjnInkPjOsT\nn624QpzhN17TgAs7WX0v6zIvRqH72sTzlFiKzK1GmGYQOCmEaF2xHb6EPTu4\nwOXu58jBT9yFncktWdBuSKrGc/DaIoQS7Q4U05MfiOkoeEoaGS/jjBWyoiuY\nfljO0iByLE7ZYnWAPLOt7Bp6XB2MpNp/Gcfz95Q3u5hK/aXnG7iNq9pzJV3R\n73+A/2qyXZE4+gCl0RDPqv39oIckzwDvwrPNHMyLvvUT0tDmYUI+/OvSRC8i\njqHS0V45dVdvJ5ukZ0V6vqr9xPQhBlpBZcqc4fNYtzVQAYJgvliwD5BKBBl8\nALXc57oZCQOdtYZqWYQr7n4iyHm7E6FhuPt5vBC4mTt8rCzuCLnNAExWni7D\nyJwia0RTMZwwwcFWHjeC4qeKNvIlNT2oxWHmuqG8MXhMvKPKwLKGHM3v4YlC\nBggrk9ssC3mwJwq8G6q5r6tZyxPCciQ88SobCCJvtkNvJGgZVNuVj+j0a59J\n3D1g9kYdl2tyIlBgbHuAiG0wBoJebSKkkuJK/WLhWpp9gAu+APlyp2PfyLjk\nxJGHuk7vbHiZtoMzAuHluvEQBYIHG2U2S/ETiTOa7BTq6q8noH9f/IWNUIIg\n1rVKK3+vBAn6tSewPDtIU59JGUMR/1YF/xJ8RXihkzWKSewDCvS/9awdrau8\nDxbR\r\n=QZJi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmKbqdIkjjrPr75vkkQE2fiXesbNE/6W2MLhQ6UO0cygIhAI/yqzbAp/rpfKdzR4QNLqu5D6dxDGvMPFnW5AbFqjqO"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.6-20180809163830_1533832825920_0.9158419935516595"},"_hasShrinkwrap":false},"0.1.6-20180809175022":{"name":"@atomist/sdm-local","version":"0.1.6-20180809175022","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5","@atomist/sdm":"^0.4.0","@atomist/sdm-core":"^0.4.0","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"1d2415f3179b59c7d241b232f6f6c6452dab80d2","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.6-20180809175022","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-9ZPhNorqI1k4CjWXFT/Vg9xSXQI0uUtoAnZevMCep7oJ3Vkdl+FqPGpgbCtRJYfOhuf875phfc1sVOLAt8btxg==","shasum":"aa8488afba00b8f475f71a24d5394e5f2ccf0451","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.6-20180809175022.tgz","fileCount":314,"unpackedSize":945528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbH9PCRA9TVsSAnZWagAAzesP/2g1zaLbWKqd3/hICZnN\nKrdt2m45kU7wPMLBw3pyw4g+ZS88vTTKvaHr5hmr4XplaYaLcY9jgqtjaMVN\nq4BRBJfFdJwaz48vspRm6e2MuDZrc0wUiGwIMe0igXXiri1W2c+M21ffHQ0m\nuzQoP8lrcrWxw1nYkH8gr7OgTuPFpfxYUkdIpyXs1nYxsh5MCLqpxwGtUKhW\nRnPnYnV/B2Mpz3vTgEOsyHzqh+EGpJ+Nazh+05R/WzUqWumMYH7eWWfFxpxF\n/wJ3gqS4FUEEowWx7PxpWFmJeSlZjoMO3hRdF+mHiLhWsn/3mK65ZzZVtxgC\nflF/yxdmLyRneK6PsL+3O0rHiCr6Ia35fyeeVrpN8B3Jx3vfL5C9VMDeW0Fw\nEpvMYCjN1rGU0g8y763Z7a61gFLmPpxa/mpZJXwyHO0RLIURJ6chT3vTJQbb\nOOFV/a7nsdbrtUpOUHI1VFxKsTU4+7br8BjALbBqBmD2MD72z6fshWv6ReXx\nmaHRMi8zV577m1VnTRmfnBstjA+LraFhEKT7BijbaO42lKUA4syhXbQkXnJR\nqsJgVHZzwuqJTGm5aWPxht2K1ufi9AJAdzksL/nBj7KzT2oVpBQSv0rTxmbG\nNDd/QOzPZswd1DwWUgqOwjBDF+ty18gJCGZpRD9V9TGK71e/CbU74cpji9vo\nnzfR\r\n=6kTy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC3pinWwo0lT041Rfz5EjvPmRE0Bfrrw+nFjMv2NC+u3AiEAu4E+kxOXPkpyZko952ej4sXUrCg5OLqJOFlkfVH3cQk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.6-20180809175022_1533837134680_0.5392807995987516"},"_hasShrinkwrap":false},"0.1.6-20180809180941":{"name":"@atomist/sdm-local","version":"0.1.6-20180809180941","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"47fa9a3174e463a2df1f08f84f2b507120cda683","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.6-20180809180941","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-A0pTRwUhSRRDqe1nxEhcjnlqGTF9hi4jAG1GJqPhtTgLDfEV1DyqFU6B9AZvYoeP0s8FroOOrflCLYEEuaL0PQ==","shasum":"90a2044e8e95fce4fe99daeaac270ac605315ac0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.6-20180809180941.tgz","fileCount":314,"unpackedSize":945528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbIPvCRA9TVsSAnZWagAA1wUP/0/hZDnB/TBHpncu/2ge\nhe7JWyfhVEGOcQMY5ScqFTDijQoGRPmfw3xYXxLY9KRw+Eb5JXUK/usPQwOA\nRh3ZSHItPeTfDd78zjOY7WfHAA+l6U47jXBbSHuQ4jhhbwVyA3cI8CyuS5l9\nN6bbhzcxmvmT34abT0qJsA5wBM+/0L58o0KoJ4PQ125w40l4pjRF7vFYcsqt\nnSbQXPCVr/XFMI3DIA5beOVl4j/Ij2c1wwbNuiVP8tdntwvpmf64OGr3ZkM2\nfOgk7aCB1QsJRohe9ij/sSJwNE1qnHnwS878tCfyKXJoodMfEwUv8+nAJyYf\nbyp231/ptehvagVnFq6Vvwk5mXFJbSQidcDkC9hMiUYQUFdBis/zldpGJTGb\nq0BTUE00IbOeqTP8172Rzle3w7rs5N4kaEBN6cVpTaEzWOw4Pjbp1qcqBN/i\n9KWuf7ntjVsdTH1FKqT2MPhpSNN8wHp9ts1jbLdVGg0CoZTnXtXuwG+KW4hY\nErg6MGrGqh/ca74twEtgylIEuqSlabWAJKYpTIYo13ZXmg96gus8Phl4zHzj\nDe1Ln2Q5DaHb1pWORs4bOq0799xMKJBu7LGL67D+3eBdu15UFI2C/wqytUWG\nRH/oNUA9K+GNN5hax3jOqfhAn6s9aF7Lwccqen58YIx1mm40KqWe63N5u/k2\nw88a\r\n=uphV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH1+zDV5lAnR3O0LnA8K86sdLrvMGqPvQoy9u2t/NOvtAiBaNCbBh9tN76IH3wxKENQMNpIsa1+pQGha+sxyJtNYlg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.6-20180809180941_1533838319062_0.7079680065387213"},"_hasShrinkwrap":false},"0.1.6":{"name":"@atomist/sdm-local","version":"0.1.6","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"47fa9a3174e463a2df1f08f84f2b507120cda683","_id":"@atomist/sdm-local@0.1.6","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-nsM+BIC7CGCj63VtLpfBgMlDT4o7RmlzDiaWcsbD3ddM/gQ/X8YatGjmZauntqUCLbw0fZ8hFsMaaky2tDiIfw==","shasum":"ec8698e1e9e78bfe3cb504132c8469c0bda8fda8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.6.tgz","fileCount":314,"unpackedSize":945513,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbIRLCRA9TVsSAnZWagAAbL0QAIZ12q30qJVeZ/zs0fM9\nsBA3jn6PyS0rxD+rN0co6C8wtF79yDigPJX1KvGPNxB3oLoNeMAlYSsrM+Pv\nF5Mz4XnTlAujWZt59ySUf5RQSe3GnX7dvFIYEIOFx/aXXXFQTamT2pnrjwXm\nuDm9zwpgKVnFErd96MvR4BY2cMWwEJhOs3/lM9VLlCGbet1pV7wQQno0jZHu\npik8iGJfFP2VcLuX5+y7AXuR7OStCy3GctU/PTQ7xcHJ8awDMbyoSEG5X4he\nDvvJ5Lg5o8nvEzJnHbXeVI/BdzmKYUlP72r57apDD0ZQjUlTWL6FRPP/kuAn\nEloz7fVwjkCbTnpmqLu+gOTiOhDXlpgSRRP8Ifvloe+9pvK4MCpvUokvtTbN\nRdzMQ1E6pktcB1spfUWEKxfW2nfjLeeAvdjq5+2R9Y2FxA4fpXjTbedPTQud\n7+z8vTyjN9kU3lY12ooEWHhmmkpfLEY0nEhJiJmAo3TZKv/geY5FAwh3eLu3\nnuJSUQtTHafGPvdeERR3n0/G9GoF8nw4SZr8XbBBl6Y3IUkiPCBulAT315eo\nI02dUZkXSMuUPIWQXULZdoSGVYlLxs4XAjQ2ZHgHRA7/ujTnuvb1i0Tev6Ql\ndmxKJ4dKSl9mVqEPOTvm6JcOUUxi3E/6UmAtClwzPq9O6+9Db8CFB3TtozUB\nSlVo\r\n=wQbq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBUHZ1bHa5Ap6J+a22xApyeU1o+L6Z/Ch51777gauEYKAiEAzKVCjwVPwbEJ8BSkq65YNAfe83VR1dqk7frjf0B0ekA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.6_1533838411114_0.19747843914688445"},"_hasShrinkwrap":false},"0.1.7-20180809181437":{"name":"@atomist/sdm-local","version":"0.1.7-20180809181437","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"26170804c13f014850705da9875505b958140938","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809181437","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Gs7zDiWUkbJcieNE6BePUi0BmTu09UFnaM9OgQe/1jFUoeBHDbHpDca0uDwM/bDiEnXsaI8X9tgYR/0+Y0qISg==","shasum":"1e6a2b1080dfdb4902377602e755cd13ed1740b0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809181437.tgz","fileCount":314,"unpackedSize":945607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbIUcCRA9TVsSAnZWagAASRIP/3XVPxsVPT8DpYp32fXq\nPND4X/QQRTB2mILYTlPGDK4CyQxvuwYTstg1CzbmeD56CAxaMqLY2ltlf9m5\nuAYEBnOl9ImNRq02PH3cz8ImSnQESprdu3g10NIHXFH9ta5XjQpxakztB6Q3\n5kVVnqVXSxgk1dIeG14Nh5bl5ktq6A+l+JdJduPrejEdhnrxSbynSNHoE3X3\nvVaSl11eG11BcNHIkqc5jwMI8fLdnULIpJrst2e5rAlZfc3aTK01NKqubwc2\nW3dn5sBA3B8qXPZZqKK/FZFu2GAdPCedTtA4ME4qrEitmHJq7nHZ5suoJZL4\nV8smlwAhpvsj38NAHXjU5ZV6/mCxQmrkGc2qdThQNDk7t5Q87JxhaW5rpZIA\n6Ii6V/Syk33Rfa4LflG/J12vtU4ihWhnOh1Nq1Jep+28YXhGhq3GG/KKvD9z\npEf7Z3JaXgdM+zA94kTyQW/kNIM4aHLKRDrl7a+kHmsDyPoMJxpG2hn+MxCr\nCI1cvou7UVOwWk2GdIt3/e2OZ/sLnZX7eZzhPmnXFNNN72knV8NDQ7sy+/yO\n6lnR7qyGEuYcFRcsbBi0OFW6T8wUHzuZWtAdtk4x+/sie8UkwXMs1reBnIn8\n5ucS6P3GhO69JyD4Wig6a2yNmJ76+vGJcAWgSUhPmB9p8/wN4Q90nQ6ZSWYx\nS5Ls\r\n=MU9D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHTKvwTBcX0iOrjAQDQCOrW7B58gfKyxUpgisGxJEKEyAiAfoMTn8EkWsMLNIJ1xw1Z0SyJzia/H03bUmK5bwL6qLw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809181437_1533838619569_0.08238096867701583"},"_hasShrinkwrap":false},"0.1.7-20180809193105":{"name":"@atomist/sdm-local","version":"0.1.7-20180809193105","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"923e333f96e3e20a1eee41b2e6be51b346dccf67","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809193105","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-hUe7ip99epjt73N72ETAbn3lLrqkWeBoDFDW7KMltXKoUl+HPn1oPYEFrrOrU5Tht2v6HJEPrbr7fgU/MDooGw==","shasum":"c85a1f962a82d5b200817a9146550a941215c963","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809193105.tgz","fileCount":314,"unpackedSize":948561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbJcLCRA9TVsSAnZWagAAjPUP/1pQG12WYYnHEpe2EDQa\ninu2R2EBeFxBQOdG1L5yFcj4ePofLwbeWOsc5xeaalXvR68PBphPoAWoEfEP\nNusFZIy713WilRLfwYyqbCJ/WCPifDhSLiRLp/owvGVnv6jlZ3UtYtpw79Qh\nil3/wZ1hjOeGRoQtLGoKCaV7JVOPjJu+81KMAEtiJMnXQ476sEKFGUjJbwY6\njvWCUL26NmdxngAsso1c8vAGtJETHMMZt8jPh8XgGaVEUNcSTGW46l3w70yO\n/ZJe73aRObMXBP06qJmXbX/2XWTVYG3aCFPHd5ZMQEf8EE4RB++JX5Ogk1NB\nSFLpU2I7VEjdWvoGDUyM1Y+UUWaXbYUinsBceQXr81PFTOil+qRCjvlnpLbO\nDUnaehjqDRd7m2BDhwzW7Tquo6CYYeqVbIQE3cS1rWFSqok7z0j7piknKE1h\ndukYdbdPTqYPpE1zh2C3Qc9J3YRuPoJjjwGmTDGOXKJasQaMKqdtHgwNxZ/r\nuQxMCt65nfqDhN0DxQ0LrhMF41wI1JGYKazshHCXWSorRwwmozGpqZHYB8U2\nYT60z7XeUaLrCDSrK78vgE65DLQiZFcwIVJU9K9KP0kJf3QcqcQhdb9OL178\nPGMivWelRreJ6F5EWkRTkNSCxrP3w1yE8+PFgAK8fodVXimSUMFdJRUZrKX0\nBsXf\r\n=sEC7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAhYFNdOfhP16mzmMAvhQ9shQa1sDsgLcdt/AU1k9msoAiBuxDJFDUCOfVDSTQqkyhr5tpPTqkw5PeaxBsDrCHf0gw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809193105_1533843210852_0.11386129686027768"},"_hasShrinkwrap":false},"0.1.7-20180809204609":{"name":"@atomist/sdm-local","version":"0.1.7-20180809204609","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"76de96018111b511cd2a43be9b17751a50c42726","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809204609","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6VxfbuloWyIww5GFVX0NEDH+b0R4Wc5FfpHnwi398FPAXCZ7ebO6BmsWLqa+ZZUc1/PQMYt+N+j5LWAmiIuDIg==","shasum":"bb26615c2095237e5eff01ff49d87b976927c9f9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809204609.tgz","fileCount":314,"unpackedSize":949518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbKiiCRA9TVsSAnZWagAA2bEP/Rs8n3mfpKWjr7LtCzcL\npOv6HxZZOYLPBD8LTS93lsRcosL7JSwGzLGKOJpfHvLipX+WpXa39/qN1ME4\nGJqjnfUGe81seIXnzceMH1yd1VqvCkLHDDsGQd/uvnfwPlFLA7J33Tf29UOW\nGhJHZBPB5yQa1MyZ1Dtk+O3yGLVOsZfUIuFMzsSkmT3KDfjvjnYUAvyBzZik\nfRuqzvWL7UaqJyU9jIXnv7AAluZ/JxzJpspaABemQHpWG0Ba2ALPMnl5hiiy\npMCI59sut7z1QtG5mnU2UOOR5MJjp8QPgkmqjLLvGqgGb/VRPxW49No+V62k\ntWIYp+MUb21Yp4e/F5/v8LBeDxiOGvlUJD5amhc/NT5DXk0rCK2pvfIAd6X7\noBHTCkIbGuFJxPd2AwGmQf7yrh+KEVzEWnECD1OfPncs3H88gx5WyCOtzBCp\n1okvci6Zg//MVXgjNCEeXp4u8eHcncPu2D17CgahHGy8RKXh942S9/WKoahP\nYACX2MnwGtFnxlRgDuMtJRJ3ReZxjpiKfx1En+cFmHDJJwR6Wqu9bi4s3rEM\nMy4ErgwNRzMd370RG0YZF8oSbuQI84GwBBzQb980GQQODEXGIF9fQpEqnu47\ny08noW1E+cBVzxJpXmqAocsj7ZCkKaBxixUOdkeohCTiiI+G/uyyvVpaxecR\nJu7f\r\n=3R9m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWcsyFHF6G07tvWGuB8hL1shEIBScPKXMwnW1u5ddh1QIhANvu/ezJlp08T7cj+faHzQkIaMiyEHwK2qjA3zTW46+n"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809204609_1533847713997_0.6667043842796618"},"_hasShrinkwrap":false},"0.1.7-20180809205546":{"name":"@atomist/sdm-local","version":"0.1.7-20180809205546","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"87e5a332325ad1e8d334583656395f12c18033c6","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809205546","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-X9f+pthSj/yzAXXRCDbDd+LWbzpEtAWuxwL3q6v7Uos6n8WegU7sVYHj0sDPZ8jagxhZCbWvR64tGrSQuc89Cg==","shasum":"fdcaa36ea9a086a594f4918fdd2697e08d4c224d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809205546.tgz","fileCount":314,"unpackedSize":949802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbKrHCRA9TVsSAnZWagAA6OwQAKF9bdzdS43RHY0IWw/q\nJ5WrTzI6svWHUVMJOLGmkv/766xxBPj5+L0xG0QxPnfBmoqHDg/E7zIvNL3B\nPh6A/BhuCQAcu2DYSlpqz2Nk9Ih/1qz8seS05Vtu+OtCq8GSEW+DKoPodaP3\ny73zOP/94bMzG1AA4tKm+WraxZR7Pvh56BaR15R7wOPIBN6I/BJluh2U0QZ9\nD1v4uWS2c7jkGQmbl7qi2pvxoGGVM47RGMsi1l48yTS62+sWvi/Bhdyb978B\nFzrm51x2ZI3u/hcotx0mUOAN0FBpuGCts0x47zXsGVIhOkYFhyFticRkZhyc\nxoQcJ0I3KsZeNeMYP0I+iKaprwmA0GB4Yw36IYFQc0qgS3X/fMpd59jE59L8\n01sLvdnf4j+inkDBJYgaQkPXYkf0u5o0N80vcv4+rfqRFt1oS2T+hPt+6n8N\nAysauYJ9irDSDL7U/hhXWm6tfpsdLnGOrNWkMpC44xwwMVssCxXIZ5P4JXKO\nO6Xn3XmwWw4IR5xlCjbiVPYFONfZR+cT/bEVKI74HBipOEzodGLv+2chN0Dl\nmi0ZJQf0rte+tMW24qzHRA/deBf9K4R4bN9dCTW1aRXDuk/u9F4p8cBo9+rt\nOkN4ckEGSYzkIgZ1xxNSMixNlN7daJYk7g8mKozU62XSdxYuDc6hpYL+y5fR\n9Au5\r\n=Oc1B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAW7iYSGD0nwZ7NQq8wownyYIImxvA7qR3FiPX6+kkGAIhANUxYloyKgiafek2H2N/ni+1CzYIFQJ0JVxuNOC6LpFJ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809205546_1533848263133_0.9079027574086247"},"_hasShrinkwrap":false},"0.1.7-20180809210008":{"name":"@atomist/sdm-local","version":"0.1.7-20180809210008","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"7ea9a5ffaac566ab5633fb02bce0e5d27b64de56","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809210008","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-VfOE8VatZZdJ1cLRwVkS14dz7FZAeVW9+ZyizwydvH/6Sq1MoRovISAdJYetGmpKaenEv7c+J+tBqg+5BEpBpw==","shasum":"093ad0e9afc5f25ef8563653694c36179245c669","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809210008.tgz","fileCount":314,"unpackedSize":949665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbKvmCRA9TVsSAnZWagAANugP/1wT4ywcVaPShByLQlxy\nqLAL2I6s7fmgyMJlhLaE80AmMsvCVEfMljlWdwK3KHiq9dx0LDzsTXk/Zaj5\nvopBxxgasjEKmrXF2RkRStzwGya7qP4npgCpYCttAKstndrvQJCufp1fnoVh\noAUkcAIb0V2+mtjFIj22S+D3YxTb70FjKz9KVZHgmGnwimsuYAx2/p8coPDk\nE16I+BTDmhefVkhX0wdti++5CWDjiXOh17wKEHfXAMd/QqDPF4aB8WRAgexl\nCm6d7Q/o7+YKs1IHc+PeQ7BuRpHlZpakrJRBdNLKpf7XTJxH2mpFGYnKkl4G\nGWc2mRXWHajlAa5RAfonH5J67HV239dCI4neoXZhYxaDc9+wFYwApvLT7ptY\nUrybnC/hBBsMLbOLvynSGZ7dseeiKkTXdWnBgA7rv4paIoAUK5nEMlaArLH4\nHEQWmxycU+ZrervPJOF28JyTA4gqGe4nk740Hii3UZLG3u34x93VITg+ly3j\n6Vg36GpwmzFNdVAsENLr74N5i0yByprnKQo9JaQQ776fSfMIDoh0QunN+sW8\nmgoesDFeiTVkX0QGV7Lxb/vpC+d7UfIhcDLSdj+4ItKHvhDTY6N/qMuVNbPq\nFX7xrQStwjEI49SNq83FdQo2RGvZQKgopTVnvdgJ4zgr5A3eRc9OTKsLxOsv\nzwaA\r\n=9HY1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEUrJcxYpQie+ipibfzrqbFZnl7vdQ12ijroHA0NSwvAiAMAgZpqXvcNmkVkObV9+Vmc6o7HvVEgcT9Nn5m+CP2yg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809210008_1533848549729_0.10645924780990357"},"_hasShrinkwrap":false},"0.1.7-20180809211614":{"name":"@atomist/sdm-local","version":"0.1.7-20180809211614","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"62fb02a327ce476327b161e00ceaa21542040d0b","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809211614","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jYZxBQ5WNE20FJ2YvSqou/NB7fmhysV4zLU4lsr9HY7ECQitVsP+6828gqD4Gwl4i1HWmJtXIXZZGIu9hfGANw==","shasum":"0d7307b374e14aceada19a7e0e8b756ed204ee51","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809211614.tgz","fileCount":314,"unpackedSize":949546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbK/NCRA9TVsSAnZWagAA+coP/ArfXmOqK011aAJhBg6K\n0xXj3r46WHTQSPmGwUBFqISdmHWlxftMSQMbiGDalfbbEIlTdwTYspbErHlZ\nKZMXi/qUjR1Im5ecBZ4OXKY4mRqA95kVPXxZF4cfPPSGknl/7VzeGIy1sbli\n0qSaYz5fTKIgEgzYdveaoaKm5IbzJrnToW/VsbZrz4Uk1HgxLLKz8rtB3YxN\n1e4xEPFdURgOIDf/NeZnq85LcmLZu+8KrnoBQVMek3PbSEtMCV5fj9ESUb6W\nisUM3McZ1GiLl1z5lqRejqeCilH4Ts4NjHVGDdjp/NY6v+FZlw3KKP0xe265\nwfZk8AF3qOosYGx/ihXHKW/F4wwYQvoXMS6B3eE+1JfCYJHuGkmWvrZQSg3s\n0KZ+lQQgRfkxxGKgYraGXWfhN86Mq91bOZEnhT6VF31s6qXuDQGx2WCetXr/\nHoisZPLDCsPVTeFU3g1/cdVsWzTygV8VXBlDNWxILUE7fY5NvLAeGp4n77ED\nmyhL6VnX7lVpdnH8bc2bu3c80NtQN54mo1Dx3wsTdgeG6fR4GNcbtlkDG3/i\nBZ6SKHVbGT2VhtfN9Wiu+VPVtWRCWfgCPPvT5ufm7870q+ofR+EhnaK2Sl6A\nTw72epsR3mdxg18ZMd1XwzY4B7/Iw4wGKGkenInOMBmP0GZ13fj09QsG47gQ\nS/Om\r\n=vqI4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEIFScs8H1IhxavuQk0klzgfli9Sw653VkKbRJZWtY8sAiBERD/5d07JSoaIJos6QedFTFKTRDULNUFbAzsnudoIQA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809211614_1533849549342_0.15789023669042224"},"_hasShrinkwrap":false},"0.1.7-nortissej.add-libs.20180809224214":{"name":"@atomist/sdm-local","version":"0.1.7-nortissej.add-libs.20180809224214","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"cbe706daff2534a6b390d5492a218de30c25b83d","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-nortissej.add-libs.20180809224214","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-xygHrX/S8+vJg5nHCo7ggRtaVpn5qlCG4WnIbnHMezer1iNy34zAj0mJhXuel3Pi4Y9VEGiMeQ6+KoJy2f3kHQ==","shasum":"3bb7164316aea6a480804f25c73e98db39f9e971","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-nortissej.add-libs.20180809224214.tgz","fileCount":316,"unpackedSize":948806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbMOqCRA9TVsSAnZWagAAfmkP/RQruaCAINFYelsfQy+V\ntmaUtJ16B76w0Es7c7oU91YKHzomr5G/1ml3/DKLNDrWnRdRDmZAdipfcKpn\nAJj8zT3LTskOCF9HnuZbNlrb/yXPLwAhH+jFb+aKCYPsPgBq/LW2uSURLp5M\ntya9YqRnfc2gIvbzQE7kX1zuC/cUbsTJVuHqL2gnxHiCdvucVE5DacHZ0MGg\n0rHB+5R9zrxLSVJiTUNqq56+jliPWUoaCD96RafECkMpyl2P3Sjw9vlvLY5J\nLlaAm/5+Nnn6lgliiniFoGOny0gQxbYKgEsajpa4OQkMbYJzt00cs473XbL6\nSd93SaolGiiRqWXjgnniX6pMOGEmmmkMuoknwCJdmk9nkIKGcsCZX9nav3BN\nxIy8msWafz8B1+9gsK7HiCXgeIHqXs3LkHlVTGSYFq06W9p4mXJclsRDA0wl\nyZEPYzS1n7x9+lb81hiTbrIbiI/cjG3/IGLwX7e8Zd6uZQyUaBtauxv0iNkS\nJCRfqoF0WhmJnKsaPm8nU78Lif3Sq8XYIpeXQbDlNMj5nmL2pAn5nJHUptHB\ncH2z3ZymW6YrJx6NurXSBmSiYO+l4vstALMxD/Lievi8XvihYGPHuSREemw9\nMUnIqs6whBnkagU8IlvU/AIsozpMMa6Siw+uxBwB4L39mfoWBaYcH4CZ5WJ8\nFqct\r\n=6+wx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlyk2A8AzB9ZS3znrp8+5jJ6gorOpTvtjH+gZajhAUnQIgZsNC2WfsB9YNss7Z7yrDBdmQ3LLnhDy7dzx7sfdhHI0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-nortissej.add-libs.20180809224214_1533854633699_0.9421574917850273"},"_hasShrinkwrap":false},"0.1.7-20180809230355":{"name":"@atomist/sdm-local","version":"0.1.7-20180809230355","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"27171941625d74c37146a592d1cbd2d3b37efbd4","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809230355","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-tfOAYCSrdi4dHBPGW4lAS8Q/ph3wE3xURFh7WVpworjR1cF4mEGeUjcEfQqnSkD1VfiWGhFy8KFC7P0WEqI7PA==","shasum":"15cca4b538db150357a1ebf1781ea9965ef4d3b3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809230355.tgz","fileCount":316,"unpackedSize":949772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbMjfCRA9TVsSAnZWagAAq8QQAIRC23TfRAXvjyjVDSQ7\nrnjvyErfW1gINlZTkvPkkX6WEvnefMeezoMrJOpZAPrvdG8uG8DlBEy+nxGY\nrz/fTQTS6yuOqXLXoZbO4ahesHcZF+4h/Ztt2jH9Bzt/xAODjunrAd+zDtAk\nOsXWLioqEG758ai9YsqJ3VoFVXJrc3cf2x7nmbOTmOhlLHw0aWCF/AiPp5z5\nmQXDPR+pbMpFKmBkgRu4yB9piMQ7UiG8R0AuzyG02yJOHZFcd/ocLebQYxnf\nbf4aYWvFKF7X0Rc0Hxbz8KUaT7WLqrvDc+2i+emteuTbfuoUvZ9RR0IhwCBB\n0mGncE3iYetHxZco19cwARX4LlEkwYsJKKNRwldEdEgbXjLSSm74PCw+dtfj\n2g1UjS4cDIwIGhONbRdn175nLgzUOAhPlftdg4FVt5CcMjXwq2j5etCRl+rH\nl+7PuqOtnhOMeEMfgYZpUbDhr3u/d64seG9JyEWK9q1SrCdgl3deL1ULfZ0k\nTEqfqp19J8Fs8scmnyWfM73EAQrVT/5b1pXuJXZlLQdIUkddBozHkD49EixM\nuz3nSGEhkhBhtnHWDHUCmFFpD8uouND5YHXniLu0t6/qcpqudj9sITP2g2m9\nLq6YKBVyCbO119pCBbKsCGgJj8InPxMJ3gWeE/r7jdOpWfiktk2ZGNlNueCv\nr4Sd\r\n=HwGc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpDaMEbVd/U63eH8easjZUzNUcBNBf/NvmFC0D/ObO+wIhAM0VpcYTq++sjqFm8CtxqaA37Na/SJZo7DJkHgnECTgv"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809230355_1533855966913_0.38546874522985286"},"_hasShrinkwrap":false},"0.1.7-20180809230905":{"name":"@atomist/sdm-local","version":"0.1.7-20180809230905","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"2b8bebcd0ce4f45915b45faa9524f8c3e2e84125","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809230905","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-n+2xMVOS/6eof0qf7r9UOjMLuqI68o+1hzvbHR+Vo9co2eKPB6pPd0mKPPZ25V52H7bcTfQ+Hp65KagQcaZd4g==","shasum":"c2317382122210d0e8f2c87f8055e407f766d604","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809230905.tgz","fileCount":316,"unpackedSize":950050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbMoRCRA9TVsSAnZWagAAXpUP/RkFepfzJmPrhZbd0UiY\nXACkip29xao0Wccb7D7C6DewcHZDfEauWsRgyiK8zbylfsXq1l5KqpYs0X8u\nfh6fwkTjchEGCVXKkeF9NVH2uwDvTpBpnA2U5E7hpQbgZ07ynEgg/FT9LW8C\nhTV3E6Evaa1ttChlNLA4rP4yiCg6ATWGMRhSdO95klyIQY00kPZ/Ub/UECeu\nylk53NQ6IdsiriSu260YkK6gbGWGOor/z5vmv2E2dCah4Iu9qcKybn8GMy51\nUiuB4qwwKInI14H6L/Dgvf2Iv4xeWcqUYpRKH4+3hlCx2F/Ra9GAxvVE98rb\nW++2wDIDtWoLjj7by314Tugl2JjrPK1uCfQQfsrZ94s8bLM4WlrpHMf+RMQw\nbqeho5dE4cgrOzhkPjrDNZgJ4K9E5f74FmZDQLcfO/6kLGuZtmncvIf4fQKy\n8Y8K9kVdNMMJfX49BaGN2y3IbK1kRiJBX59HEhni6LctGCX5+1InwSRHbZJz\nAnIfiNo5EuxCVqwgyqj0mh6qZznSW+LgG13Fc3ea5GfIa1PJLRD1Loq6wkIC\nQZ1gncpf+DdHnIzO0UMifrmX4Taz2I6WLQDV9qRwZTkAbtHoUFVzKjNprjDf\n9sergfoYBdZk8Gst0M0sBqNXK4DC7avwXB4wGt67K94GLQrSUg9ZTPLHuR6+\n21Pm\r\n=/cGW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbZXtdMXB6UReE5U7VnXbhz17FjNc3jlRJ4lSnxzQ0hgIgZ2uA/1QAhjfkIATIxllMGh/2nZM7Xhdye9BHYvwc6x8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809230905_1533856272499_0.3716829452788657"},"_hasShrinkwrap":false},"0.1.7-20180809231248":{"name":"@atomist/sdm-local","version":"0.1.7-20180809231248","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"aac97ef0f13ba5f4d23958e596466d49031d35bc","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809231248","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dCbpP+o4Z5UrL78r0red9djlUkaHx+FN5mj5ZhF+zokWRgWBep+lQmW1TyBoZ+oAiE/L8uFjYy7ms+wZ5ZiFZQ==","shasum":"9806037053a7a7da5325cd410889d9de28dc093c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809231248.tgz","fileCount":316,"unpackedSize":950062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbMrvCRA9TVsSAnZWagAARpAP/jFDf71/fUWCLmr3Q7xe\nUnm/NCKzg5hrqW8w0X/EEFtHB9+qUEGAd7ol9ziiRskVYr12y4ds1tWnXhxc\nAeV9mZ9iKt5ogdLGZVrZ6NasGuy5BSHYes9kXUzPaA1c8yPi36edjUSPYzg3\ndZkWAKslgOAr4txIQvW0/r/Rejt+B+seHxHok27NsoWqWZtQADNTr4aBFAfD\nGqiNCFTEjDkoeh0j3OdFvDlSLAuYkKOTd5TX+ohkR+NRt7iVB0FjeNqULgeX\nSP3oP7vI/PcdSBZKXpSOnthu3ZhvaqDDkIfehv3r0MLISC7OCEKrNrFGD42y\nz3ZYTTrt3n+SbM3f42EbfKeWDSga+/Rywa0FwUOw/5qNh0TvX241BriBijBi\nA6zZwLK25iacLLS2ESgNmZpJTwT9jlLwcnbR12oE/llytcxqea9SqgoLoUD3\nGlcvKry7LFJrS/8klcJxaNbediGajZYUkdL1OTCfc7DQQWYja3gdg78K+agX\nkdYciIyNW0trSq7bj/Cyl+tk/OfwIp06f3yTCop7ATx36voRNKW3eYy89cij\np9JHhYS4XDIRY6egOg2BLuWKE8i7agSIZ+umjP8vx59uu+AqI4FiRCK49ATW\nB6ufPWyRCSXNC8AAUFyb0weAplfdQCzVTLyno9CVXYYHBFlESUYd+/qIjloG\nsWmI\r\n=7ETw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcqbbh7T8Hl3KBY3l5nnqJ+DmQWNWeiPPT1QkUhTy73QIgEkr3VX1yOfxmgMMCPLCDxe35IcrVjS3f+hDoUH/fezw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809231248_1533856494555_0.8633285561245951"},"_hasShrinkwrap":false},"0.1.7-nortissej.typo.20180809232219":{"name":"@atomist/sdm-local","version":"0.1.7-nortissej.typo.20180809232219","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"55c196176e2c5d67cedf84750d81e201914f93eb","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-nortissej.typo.20180809232219","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-BpXSnUXuISewCtbDMQl2pa+QbP+hTvxRJnLWSAH0xenw1I4jvTUCLVYLOahDG02oIulkXmqXdt9wPiBFsct29A==","shasum":"ff62495a67c5e28a8c42fd1c4e7ee45995762057","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-nortissej.typo.20180809232219.tgz","fileCount":316,"unpackedSize":950053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbM0XCRA9TVsSAnZWagAAr8AQAJkDc0Qw12jfmindZG9W\noAfX+C+iVYnmb19dxqeowXQKGZwactTJN9+/Qr49NzuDOzNi4YpTAQmLEuCA\n1mRZCbwg5OoWyEerV0PVm6k/E4k0K2kcxjf+yKhAbzYxdJnbZbQqu32YFUAo\nBeZLYoQ40y41RJJQRDc6UxyOxGYy9Rm7cPVYJsioTyAn8GIoA7osGIKkpAH+\n5J8jlbi/okkGlnoknnrqhsChAzKwUWQ5cTs7RyuA4F5MH/ag+ZSTllZuRS4x\n7uRYmGlRnw52W233rnfInj5PSZJ5y0aUuCFXeSIPoacPEU1eOHbpfQboU/iZ\nYrvU6uDA2rFS83OYkPr360C/BdsMGpN4hu5XYYRKOVHIw3p5+FDxG8/Wjlh2\noG0ha6KWh/iXhZ9WHnRnN2x7UTnRmVvR9ozvCBt5jbAKDkA5TmbAxHr8No9T\nue4bIq8jXkarWQQyzqpvC2Xb1lNaTK3AGgjGHsiGUDo+Cd+3Eo+JZXIsiZrl\ngMF2kBpsUZBCfTLBDJEBh/AO9brRoT4o0c8MCX2IYyy8vUYQYK8H4fat44w2\nPL4WNQgR5HatjClRpUsZ9Ghe6uAES/jyROOzjIW3BCl/23eWAxv/us4LStOY\n7p97DrKxSIZGlvAb+U3O7Oqg+L1NADlXDyVRivCnme+PtzvwnrFOuHFmB4GW\nSrKg\r\n=Y9y8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMQRjhAvZf7whrJXNvaCvcFOWajpaGO3H0rD1DeUPZ0AiACTr4oZsjyc22+xUP7VROze+r60GTbbx+pF9/+LNd5GQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-nortissej.typo.20180809232219_1533857046959_0.9974132252009127"},"_hasShrinkwrap":false},"0.1.7-20180809232346":{"name":"@atomist/sdm-local","version":"0.1.7-20180809232346","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"b7549c8d37f269078f5b2b4d4367c941a8d3b639","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180809232346","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8ktLR00Q/iwe8HOZE9gjfXl/KtPfBy+lz87Tx3fY3wRkCG7lBCy9PXmA6WY4Cp6uOzC+B7moJPOsJI+WErsHJQ==","shasum":"e35fe704f6e8cf5a4c3a19f4fb08b079548b18c8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180809232346.tgz","fileCount":316,"unpackedSize":950038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbM2nCRA9TVsSAnZWagAA7BsP/1JbIKQbLpILZZAsNmsm\nmJtvxFe/UnLJm7VRywy6L7+S0K+Vk7oUde6O4o49f+hfBbEZoszthFw576j1\nj4mYXESqHobAkuZJZuGPxZdbxzZvoO24RrT0SuphjpEAgbeAcCC+Wivo5EBo\nyJ4b7fnXnNdkAzxD+Rnyjm1t7s4CZ29LKW9OLMAvNIUimBheQSybQ38aorUQ\nor7Qb02w2Abv1kJV/T7GE+sCALm+F3bsIupxEF9CtdlxDEr/8zCoJrY/dsk2\noeb8e3T6nIfWmIznHA0VC7akX6SZOSaTWDODDxKVYjXYKWuQiKewuijlD7Y0\nyDmT8jHEMo3vvco2bJ2QoqvOKUg4wLSl3ZihaKuGIYzoeckdcHwTgAH2PwHK\nHpJKRBkwSBckhimW9WNk4j2yCwq3BF7bSJ+iNogupr++HcpJug1nuHiHRYtI\nEg5Qo6rAx760aKpS8eA2RTRpuF70ITB+FyjxB822Nd/rOJJPiIrCA2LaGiBz\n2EvVbomKRizTLyGQtKZg13nV5ASOlEJRrR6oYoeIVmC4emDl89y9E+wmEOUV\nufP9PdotjJR77Mf2kY+Ug7tZe38MsFR+H4OFt85t8c/xIATEu0b+GdS7iedR\ncok6hfooSavXQ8qUU/g7EjOsgMAjeRlK2S8HxqIqfYrkrfl7zlDZKeemuBv9\nE+In\r\n=1x3c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBzg1domuv4Uuwps8lim3pku47NivogNqSwoIZ8Yv5qAAiAxfc3hBPRyfRVrx17slTcp4xxfUF0Of63ktxI4EGRTSw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180809232346_1533857190657_0.49838986048602196"},"_hasShrinkwrap":false},"0.1.7-20180810092206":{"name":"@atomist/sdm-local","version":"0.1.7-20180810092206","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"114def90c863fe4123e3e1de741333f369752663","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180810092206","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-qOKr5LGAWGwPNSAXe89cT6hV1cZFEH/Oi1RrOviRyV3WqZA20RavTuvlwH0XwdGfTUGCrbib3Ajf3KJg/x0pgg==","shasum":"6371266a6988cd73054fd9c55db3ea35e98cc85e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180810092206.tgz","fileCount":316,"unpackedSize":950747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbVm9CRA9TVsSAnZWagAA2BkP/R5+FEOpaBV+VrwMgGbj\nYB/B88ppM4tJ33zpX4551QvL3rEkRj4eHli5Js2R4uhhxC87VcAOA/tjDpU3\ndCwNDyz8Amg+rQBqAEbBhjafrjBzpWB8guFZkviw27sQRzkP8Npb6ALkuSiD\n2EMx6oQX0uBgv9SO4aLeTvguVyFX4rZHmkwshQXNWQ8WRmUFvFZjNLsI5Z6W\nheuiA4T++xFmY9Z18cZ4/P50oe0/zg2FFHBa+NvGT0ULf7XhArX967uGoepx\nDN49OSn1e/3TU9PobXPj23rZvNP4kijluzyyc7qRUQ0Is4KSCZE7SfyykRpg\nVO4If6KTmPzxMseDhxqp0wYF9cGBkqma8SNEZDoA0zv2GhjiTDSQJlalFxql\nKeykO8TwqX949ypmXYpC86xpB/X4l39wkRVjPaGhbKd81Ic5kfHPZButpUan\nxAQzgPN8thd0/PmksQeNRLhK13sKAOBlUQQDqQCj+SQnkHbSaY3BzGr4s/mq\nVxJReEPYs0WUtVJkbVRLSamfPQlR2Ox1fTUj51kW3wDBaJLajUip/xs7Ka6r\nPDS198HjWEZwmMCcUvvuLxgo708k8zSiM5Db8NNktcSWQ8/d8GVpvWdIcXV9\njCUQvXKAe7B7COp3HTFsBUkjA6takhnPjYAAQVVaJp+xkN/isbl1fDoM30P0\nliFk\r\n=pWdj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPRfWgORIPwLdSLNzZwCjWDimwu99ZnNZvwuaxfNpLYgIhALHFDntMqA2BZktnTS3Mpg90yVKuAGC70rGUVxrMmfBu"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180810092206_1533893052949_0.8643492465326486"},"_hasShrinkwrap":false},"0.1.3-fixForPathname.20180810093012":{"name":"@atomist/sdm-local","version":"0.1.3-fixForPathname.20180810093012","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"build/src/index.js","typings":"build/src/index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.5-20180807011450","@atomist/sdm":"^0.4.0-20180807022858","@atomist/sdm-core":"https://registry.npmjs.org/@atomist/sdm-core/-/@atomist/sdm-core-0.4.0-20180807030718.tgz","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autostart":"npm-run-all --print-label --parallel watch:compile watch","autotest":"supervisor --watch src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile package:scripts","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt build coverage","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.js\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info package:scripts compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project . --exclude \"{build,node_modules}/**\" \"**/*.ts\"","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","package:copy":"copyfiles \"package.json\" build/src","package:scripts":"copyfiles \"src/scripts/*.sh\" build","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*.ts\"","typedoc":"typedoc --mode modules --excludeExternals --out build/typedoc src"},"engines":{"node":">=9.2","npm":"5.x.x"},"gitHead":"ae6bdbc654ae85e2f7f76f2eab304035917e12e2","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\nInstall the atomist CLI (**TODO doesn't yet work**)\n\n```\nnpm i -g @atomist/cli\n```\n\n```\nnpm i -g @atomist/cli@branch-master\n```\n\nUse the following commands (TODO `@atomist` will be replaced by Atomist)\n\n```\n@atomist new sdm\n```\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\n@atomist listen\n``` \n\nYou will certainly want CD for your own SDMs! However, this requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\n@atomist deliver\n```\n\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home/atomist>`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *I can't see my command in the CLI*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.3-fixForPathname.20180810093012","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5KXtUFdI+NIk61nQ7WDx1JckYPV17n3ifT6SVTkYq08JjQN30z8nciZtWeKmwunktUlv3hXBHdgMR0YvdF/Dqw==","shasum":"a28eb0cf73e35ee53e76b6b6e01018870cce9efc","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.3-fixForPathname.20180810093012.tgz","fileCount":604,"unpackedSize":1422040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbVvaCRA9TVsSAnZWagAA1rwP/igB0NQXjLIm3mqQWXcH\nFaDWFW1gifH7b5hv2GRnuQsM4nmOlplUJ+JkvDQeHv0yv53G2NcWuzyjSnUH\nI/ZZVnb7FZ1t8rQo6gfdoL0Ofcsgnw32KjTyJW5HyreLNGc/AA9pJf+o18WF\n3597tmlGSVoiTHp1bAhM8Yo4PEiYfJ3sseSNNo8BGg/qqY6flZN7NJX1jtu8\nN4G/F7DvBs2KyMP0n9bkPxp5WT+8r74yA6zxDlNN21fTAWC4yER37b1azqzz\nWW89ngtOqn50OAXgsX4D7mmyedEEmMvfr77SRi0IPG1ghQeLwXeEQwbUvFCl\nYg7aKQrSG2/zAuf248gBj1J2p3zSEZQGcAzYAoZsmJ9Km/8GWf8117X8ELUG\nBGbRmHSANtUUcThQVp66YipGIQozhE7UuXhlMJBjOOKkhpNz6dKadS6hLqEZ\nQuEuD0jgrS92lh+HEhobz20MblBF+OrfXCNX5kvLLAt1iXlxBWET9pmVAdXf\nKZi3+boIcgzLp0UjPGCrnXNFiLY/5FOf/6l4F+N3nXt7yotfDrkyOCZkT5Wz\nHH5XA2bBdIigo5lFSGbv5huMNYwOONxONeZY6QHHuTR9OVyaDkAO1hvqK3A/\n8MGrWfzK7fHZu/LTVHnWEux2xP4NyulUIJM1cIjO9xuWqizzOrV2ggQARJtJ\nP8NL\r\n=nj4N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5CFn/Mxd+2iN9bkcP6h5/fiY0/rdRQT4ZsLZi2GOjFAIgL9wQKAvwAG5PA2n8zgNLP2CuPM1ZiyP+xLrVv0YuIJw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.3-fixForPathname.20180810093012_1533893594028_0.7775978075291299"},"_hasShrinkwrap":false},"0.1.7-20180810093024":{"name":"@atomist/sdm-local","version":"0.1.7-20180810093024","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"e116a0b4c7cf36fc48e54cc76dc04ac8bd35a1e6","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180810093024","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-WVCQLYm3PTBFX5mQ//HakCKMOxvhMcJDuuEJyD02KboCziVIQtahwJKNCe8XUJ8xT4NOJLRbyjh5J/r3i4W0/w==","shasum":"72acf60e0c2a82aed87aee170f08837da45ef276","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180810093024.tgz","fileCount":316,"unpackedSize":950766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbVv0CRA9TVsSAnZWagAAJ68P/3XNP0CPqLlcl/VL+ir3\n8rufVfh7TvmczYpaGE2kceLvhhAv9wgUWG0i+0sUPPcrM67mT7mpNlue1tQ7\n63Lc1PkU7OeHFthjj9h20R2nuo/4YGgWieYFq6nXGCgk2bcmz8T9TbeXr2yM\n4byn7jQ0Yb6djMNUUlfM8yk7rtZqxhCAySqDyvwUue+12v7hx0ak3gMP0xIa\nMWj/0RcODCcOdkqLhZZ9UJUJdZmfgJgWVMxOPl3HSmpwpWBIDWT10n2nFshW\nY+lRBuuLbx0wQ2hUkoD2vMWwgN5sMhyVzSSJ/iPx4XHSNrf2NUqwxo+H0TLk\nT4tKwhjDN9WJUVnqT3QsqJ3dqnExqUjL3/agISDmM7ugL+AW6WptloniPSJ7\nQe5rdnwhuBKh0H2gNLbTku2Tx/4V40K/b0SJoSdwXfLCs/nSfwVoxtVDLBIZ\nGdUp0IIE4kJRpjI5HJ5G4peEsUzpVnGTnfsl1XpW7ESUl9H2PU7RizbgAhXH\nJftq4b5RDDcsmRr6PjOSPJnK8F7XP1Cejyn05x8fAkV3+r9174TOeH45P/LJ\n3kJITSzTYT5zWjKv6+v22Ih4XlXTsLlFK4eZOtHlmY6wNbTDXzEMmdlYxZPr\ngX0v4tUpFIMK67yCKzFrx4x00c61m8XIpU1etbfnAsBBpfNH2+bDG/UwlbSB\nBzoQ\r\n=v93V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICuakcq/8a0tpZVJgBB/Uy5Bml6nX7ou/UGGA1ppMl0AAiEA6cBVkl1QVV5FdAc8ZeWcSzo8kB9RdcT/Ybw6MrSPxNs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180810093024_1533893619770_0.21869337628582985"},"_hasShrinkwrap":false},"0.1.7-workspaceId.20180810101306":{"name":"@atomist/sdm-local","version":"0.1.7-workspaceId.20180810101306","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"0de825b339ec6503257d997688ebaf4d1a96c771","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-workspaceId.20180810101306","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-2ZLHJxlUQG1HRPRrgehCFCavOrrF8nvna+OcVE3lMORz/jJgTbjqLrW7iguwbC/la/bX4bW8RZt0FuNLgypTbg==","shasum":"5bd358e22da5df38df0d6fa6dbb4c83332dd3f6c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-workspaceId.20180810101306.tgz","fileCount":316,"unpackedSize":952157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbWW0CRA9TVsSAnZWagAAviYQAJILqfdD/LSRSvi0zJ1m\nBpr4mP39u735NkKxDl2NXD7bsCeAeUImljBgoIgaj9nBH3rp2pgIp8aASFcO\n3dOgNW0DH49fjskP3WMXkJ7lEPD14TC46a2OAmuByDux4jWev1e7uH6/G6vH\nTu3N/AU5YdNY8j8LIhGgUozbz+BFzcANDqnG2gtX+E6qWNCWRp6NDEPQ43Fa\ndy+N7zDwp6mO/Pl6yJWMAn2h3cxk7OejwXRHGPyZuW8nPaJWj8y6SLNd93Nb\nT4tIE1YB7TO7YCS+kgs8FfIWhoLJbM+5tT/3cZaL0c2OSYAVEGK/5HWiBHAN\nfMyBhQBEAIP8LJRHnAq1PajSW6HkBrB4Kk8MlB++86t6cGFJ82ei/1xlnNMy\nLnYXbodBLbffpkVqKYjIB/z8TzJnor6gdOYsYafvv6NPm8c37GV1BabYRQci\n/Wc8SUKMje5AsjMzvzm8GQHyoD0ni7krL/Te7MNbqRs8KqJtoGSnL7kaQpPP\np5FCVLzu9ILXclf4GedhyMvjr0xziURHwr+UoT4YiafzmEaVroJumd2FCgo9\n+s4Xfwobm5yyVW2cYkKHu+w8uKTOYHtYUJNp628JhDn+H8r3upJKJxwUZnnC\n6rswqlhf5q6YXYcUuVhs7pTLSBfp6wa/crZ9eXkgoathv3LaCZRQ3Vz+hJLM\n1Zeh\r\n=Lpb5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLF+fM1X3J+jzlowYQecUBshXAb6n4A1NVL78i5ys+fAiEA2nQ6Vjx/C9SrEkss5NUV8RPH5kXGiB39qtuD0uk5170="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-workspaceId.20180810101306_1533896115655_0.02172170397593587"},"_hasShrinkwrap":false},"0.1.7-workspaceId.20180810104913":{"name":"@atomist/sdm-local","version":"0.1.7-workspaceId.20180810104913","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"dfba07058311e984f3c446a84f8cb5c93519f053","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-workspaceId.20180810104913","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8665LY1zsCTbxqkc/wzx2PyxxBiMTpnmijZvTttb0fQwxR1J0tajgEbhhf1atp0qZag3UZYtIgyaqSspknV27Q==","shasum":"dc8146ecef18a0ece4231d5a8b36fe4744d157c5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-workspaceId.20180810104913.tgz","fileCount":316,"unpackedSize":952163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbW4pCRA9TVsSAnZWagAAvUEP/RhpwVmB8zA6JU5mcvOP\ndqo9LV6iLjcVO3QfbCLZVI6j5efAZ/V8JzArs0cBjE6p+GOh4MXDI8VCrvCo\ngthvU+efgJtj+M3YzXFm14O1UuviYU/vBreKEPfplwtPMkgdKoLm6nh6ij/L\nG6cJK3oWY9ED0Itsclurx4UuDKq7okdJBw1sHCZl/PF5WjX17ePrGAIjA7O1\nRhILd9JxvboZ7Dyr1Wj++4pFE9CXoI44PWhL+F+KfzPK8jblA+sFcQjMkYhC\njlN7glvinLpgYIbLQgAt73+owvu3sePgFv4Uo4tsGzYXRGQBxz52XxQSu2ML\nlUbJEZPPwftsnjf3MUfbikGGzYL37OqzVd6FD6SUoEBvkjtZ4lXgx6F8kFaC\nC9oCAhJteqylZQTT0m+SJU8abZuk02mZjuhy7DqnKjNbQIDY9w8H7R+5zxtS\nW8wYpgoIoKfCRCe4d0U/hlHzecGJX4njb9rO7anZZ9d8CoaF3CKwXiiL75MU\n8+vsuE+3Tb+mkFHHkdhfAG10BpkcUmVQjzE9DqP5NKg4rye4IP/DPnwSvCvf\nCb7AN4PZTEgrdQqDDo5kIxQ8tVP4GHDUG25sYeRlDZes7z27MulHMN5g1RAk\n2EONYEX5xD9IGFOm2DueiHpGb7JTKkzI7TlnkbvdFxUVMbPwl38tNU5fobKE\nOeU8\r\n=ZfJA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAGSmd+TDakVkplNfTYxs2GJcOhYw7Cjx294GIRLk+fgAiBiuQIpFqhu+AWufXEzZ/kMtP2yPXGzyZLEjewarPA8hA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-workspaceId.20180810104913_1533898280455_0.09686634473824052"},"_hasShrinkwrap":false},"0.1.7-lieven.fix-regex-path-windows.20180810125832":{"name":"@atomist/sdm-local","version":"0.1.7-lieven.fix-regex-path-windows.20180810125832","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"b68f8162b77ba357baa3805773a1f46a4f7b526f","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-lieven.fix-regex-path-windows.20180810125832","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6iLUfsgRGJBCwVVvFMEWnuLOGwKfSq4lTe8EmJUInXyDLqpbvxTkA6wkWTWutUxWJR5At5FReBY65Cl74q2jjQ==","shasum":"674170d773c9b710200ecf69e6a355ae944bb3f4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-lieven.fix-regex-path-windows.20180810125832.tgz","fileCount":316,"unpackedSize":951568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbYx7CRA9TVsSAnZWagAARsYP/03ORaGBPJUsXsE/b1zu\nmJaU6KLNLX8C26FcOz/0dUQbvHnQSbG+zmQUiliQ0SC0aBMJ4ksYvzHSv+dN\ndFN0aqsZ+phrTitV5dLwfol31DMFY/4jLIxY/OHcbxitVqEvxDDYKDdLeMED\nGcDzhkZ+4m8E/N8YI55EoMPfb1cX1iMvoVyd1q/PmpHlsIXX8912AtzZRQJO\nE9J5lhNzyhyF1UNEENhrKndPW53KxqUDpUIlFHKygcKOJHsgHqtXyQFi2voq\nrJMplZ1256DIpPneEMvcMxWoghjA06j+PH9x50eIgcYBRIHZYQScobA1E/Tu\n5Of0yWYarrkv5beDt9o02XMfPR4xLvKtyleFAHLn19qtzZyVp0C/bQpevBtT\n+3RGs3TlV29NCgpq1YnGO62RhBmL0QgES/EKCLtmooFUZsEBuo5CMtVa2tsH\nD6GLHsEN0sYVgFyEeoRKNcoQCCCWYb+xGjyX8PL6VI9+hIEVs3CtycPau/Pf\nozFr3Dz/HVBGQuUIyQAfxyFN6RVELvTpbCXXCwL7Brs4ns8ZLJEkQkCO1Is1\n4WhjltqeLWGQrYoiGbwdhg48bAqp1ohxGwF0esKznNwNtYL6n+1hkAvIYNBb\n9nLBOCdD7FHxssFDJuCwMYyYZXlFrRp+g3ygxBi7esTvTiEsYFBZzX2eYdAT\n9H8G\r\n=izV+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBPBeUagooTT9SYijR57bIaetcT6BtVAHiNfYjUm2MHPAiEAr+K7L0mEpBbyB0RDQnnZLEenmmMa6jUcGE2Iu+8/WQk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-lieven.fix-regex-path-windows.20180810125832_1533906043123_0.7373449173861915"},"_hasShrinkwrap":false},"0.1.7-workspaceId.20180810132413":{"name":"@atomist/sdm-local","version":"0.1.7-workspaceId.20180810132413","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/slalom.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","github"],"homepage":"https://github.com/atomist/slalom#readme","bugs":{"url":"https://github.com/atomist/slalom/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"863092584d9784a25fdfc6320630a6df7597eceb","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-workspaceId.20180810132413","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-zjNR/wePYRNTaKnj5sJpcUnZwOoxAzeyL60PoDyq5beM80QM2E9YWyxU4ncFXK8CcJ5FLE8v48F2jCfri9NBMA==","shasum":"a4c222c93d3c193a866e7778751d92a675eb7503","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-workspaceId.20180810132413.tgz","fileCount":316,"unpackedSize":952574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbZTiCRA9TVsSAnZWagAAIowP+wcB18i2whuS9diGqa7X\nUQk5DCk5ApPHAyJgW3V7MYvRlmfXqRqbH+mA+pzEIoVqd4/mQxUi+ggwbA5Z\nRLzxgCfwXLRSZlp2lZ8txLyTq7uAfHjRq9sD0cSu8002/WeKeXk270pV2ifK\nDsET6FgFJ4GMVtpFahVj+GEqtEu31ZR7hv3PZii4fIF6hsZvzr0wIYM7uUeI\n6n7OD8LdY+QLvMmIK+mtZoYHHFSOrFg8RnTWNZ2aicbrD+f8EZITl7f/dIe+\n45VmA+ZoMonkpXdpcN9nMrqKkDuLlnh6wNoOoIp8U5l3ldkn+4IuAliy7PIa\ni/CUC5N91xbf0q6hwN7M77ig2llYt2amoZSsSutUhRORsSua9ifFbt0WxYUT\nbBqX3lSVGsoOqdabBPX6YpTZjfePoyeKI2ttumn6rMdgpX2DwPoPUsVwBqFm\nIRH2kCo29S7to3mYXe3LUQgM3eMvFNCWkj7ZyO5qgBCR2psnCsvuenh5uDd9\nUeVjokXNAHfiGjQ2sm9VzwIvYj3JmW+gBQo0HIYFiGMEf0TMvKHkSxx54Xs6\nkOQhbuZi5TsIEm0yYGP3DoWeu4bBhMdLhs9CgYym72/HMrL0BHjE0EwrHIO8\nPUdLw1NkfFhHtVTXAuqbrJGRl7V1RuXwvhl3HbN2KQi7qjOZgW0LqYQAzSB3\nt15c\r\n=ZChZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoOuA0v/YQPb92IvVDgeCgyRvBHBAA2kMegdbQbj/l4QIhAKCNeyyfhPjUhgC9s6cjxTbUot9cfiXU4mySiyR2FvmP"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-workspaceId.20180810132413_1533908194164_0.5551389778464633"},"_hasShrinkwrap":false},"0.1.7-20180810133700":{"name":"@atomist/sdm-local","version":"0.1.7-20180810133700","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"f1a6d436efd71982dd8531d32806c6822e361bc8","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180810133700","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-GDCVPjoV20AAKRgUu1k4tzJiMdxFfCz2YuBsExyNs/PUOdfrLLsxoAksd/oliKmFRZynxEA/dfQgIfttGVe0fg==","shasum":"af066141ec6de9dca21efa9f48b8e807fd74a93b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180810133700.tgz","fileCount":316,"unpackedSize":952581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbZV7CRA9TVsSAnZWagAAX6gP/1MFZYk9N1HpXXA2ZI4m\nhpoEk84EjOGbQu5ZSjxHYiadiCxgYdrbg8Hy+kBC7Ozy85tYg4A2pLeIQuXH\n+pU8Gwu45x2BI8fCwzkMZ1vyZjAqBc6bZ39iqyyKmZhF7R+GlYPxf7W1JnAy\n1FodWrKsOrVn2kfpYqbELqmKyO94w1Dg6j5a0eK6I7CKqeR4CnAhFBmmUIV5\nZKIjhXGPhZRxU+RA6Ist/5ODyKvMPrLgQs86rMRvirb1oMKt2qOWivwF3Wa1\n+Xk3brfm2jR7WTPQjXmGGdInOW3KLERal6Lh7keldoD/AKW9cjjBM6/q9QJu\nsjOFdk/YK2jIbMweIoTnl+2sLq7HpiAYJxN8Pu6OWn3vxEJjQ4sZQg/yyTe+\n9pugvj/uiTNtTit4LqN4DAVIW9+Qm4YdafMEXj5IyVuUNYY1f9YO0Yb1kbpp\nF29IezzqdVTBDtzCq4s9zHOpJaFCa/qoOmKpz7Y2rWAu+V2MSCLULEVDR543\nA+qIHSBzsR+iH7I326sYq9aZrxGtlVnQYp2NR3JyoO96J/8p353gbjLLiNZg\n167ASc3gp8j2RyS+2lOt7WXQ1fJy+gTrGWcnRyTujM20u0z+nO12Ypmbl/ns\nR2c14c9I4tzEaiw9YcFZHmzQKeHarxvHMzKkAUpzJxpffRheww54JGLGv7g3\nxYYq\r\n=9eLz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIErctpapx1GnywcvFh5De0E7uDguVwJj+epqTceUVFpCAiEArO490xK9HzUbaDxdPQp5qT9gS/R7MBnxukqGtOwUVvM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180810133700_1533908347095_0.6934832244620732"},"_hasShrinkwrap":false},"0.1.7-clean-package.20180810161625":{"name":"@atomist/sdm-local","version":"0.1.7-clean-package.20180810161625","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"6b622e0c8e7a5e316224f239cc94d408bed86735","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-clean-package.20180810161625","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-4SIYrd1QBk/CzgrU89GBpo3ARi1fZhDP9pMB11VxPvsxuMf8bMwMalyIc6Rcz9D62U77koGn7L85bVBNUkm8Ow==","shasum":"2b7c08c8ec00f86a9a8ca31f442994acdf8384f7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-clean-package.20180810161625.tgz","fileCount":316,"unpackedSize":953635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbbrrCRA9TVsSAnZWagAAhesP/RcCzfI/w8rZrzot2dI1\nY4g67QnxZ+orafekWOhKt/IDKuYHoaaSSOKJZ+VhpV1p5PvgOfhISk3+ofKt\ndiln04z6oryQRuWuVnKMz0D7M518FJ+0pnCyJmAZSrgjgP7dyeCSyxiIkUvl\nMmnQ7ULRSJYsCE41YsLtlldsmuDfoZtOKg8p7kSShfyxWQ/GW1XijaDRWs2H\n5uxHj34Q4CgyOkX9eQgr1mKJirQwDEMhu58iJ0USUcai3dF/6be4q8Ufx4wV\nGDcMPnHJEmaDAh2VSoyvPjYMFf2sPgGR+5NV4L3ag4ys9EewmZNv5eik27WO\n6Utnp6BiUmDyN/KcKLMAj/AjUVjs4jrzJSOmZF9dBCupXWv3jLNbLbG0/QdD\nE4s7efExdVGiSEZPihvFVAJi6xAtZKRt1csr/STcR0bEY7z13iZseQLuXSzR\nIwlYSZcLl7nVi105PASl28g9WP12cFfFZbBWqK4eHZYHloQa+BHLS29vEjNa\nke0ht9WbLNNBQ1Ov69ce/Turkk+i+ZmrYNIaEEd67B9AwY72Z4ZaeYxvIbQo\nidXXQsZyJk8WNDqCs7kjJIbx9PIs0uMQea7V/+5/FOHTyeoS2xnBP0j7n0WB\nioyD1UV8IQfUnixtrZzsWZfIg354c158nRrkkXcAvHSSAT+8uiijRJbxZw1t\nZPOe\r\n=Q4sv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwzituoPJKCh5qfKLPDEvONWJVDGOeu+YVMp7d4PzEeAiBSbra92FJ7fLWlK4eHgTHZGy5nD8E+uHTR7J6iz5zzTA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-clean-package.20180810161625_1533917930937_0.902125690453627"},"_hasShrinkwrap":false},"0.1.7-20180810165309":{"name":"@atomist/sdm-local","version":"0.1.7-20180810165309","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"fc41857a462d5703de4d1da5fab49a0b5f14f6f6","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180810165309","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-aCHM+Ju6APmlRhNzoy03m7qoEe97TYuMupv0ZlC1wSmzvMdMYvRA88rDmYE3HkfBnWy7RHuo1DNAaFgtrDM0Jg==","shasum":"48d15273c8ee5b7250d08c36bb049fe642f5cf4e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180810165309.tgz","fileCount":316,"unpackedSize":953621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbcN4CRA9TVsSAnZWagAASSIP/33DO6G+VtPdwevTsgiY\niTbtkf5MVSjRuU3ewP13FeCKzqLBz9ozPzHVO0p8QhjVilHpvzHl2nb49Sut\njACXPg1bBm4o0LFmYkrfyf1C+vhFCtj5Lvjbs3Hjn4FsvMI3ECpR5ab4IDJ1\nGJmiQGf+ylNTIRqGP3Bi5FflqKK+7Pd671ZOYYP8zEfnrblfDQcbAEiA+Jse\nElntcEgV6+VQ2NEvwTElov6ZXx2L5elIca60UZzfWCuqA8hwNWoXuqCy77ff\nnzYz/rm85FcQKWNMN6CDhByoT62YXoAkGhPV/sDCn0PEponsPlctiyiM2F+Q\nLR/SpVV/iQ8wDMg5Ik63FSRR0FBrJsjY0/0qr8DuKBFMhyxZ2kNQ0My60p3A\naCD4bC/sW/jTIvGMC2eqEaUloa0xJdglFc3j61ZZL5jJKAL4qEjpoIul9KwD\nBTzIMDpzIU7VGTWhhLJt2iJnrD7Q86uDygPdWNWDx6ShqSkaT0cj80hCArqu\nmo7zffx9x3mbqAi1U6kuOCfjT8af8ZDeqE5hbBSQiYopabyOGLO1oUDalpg4\n4V8WAu7c0sl6gXxAgEdqYOD0nG3YwiX3VJ2znDAjbCNpNx8SGxh6bo+bC5rb\n6mRiEaaas2ej59bN8qVveatOmd6E4KqEwyUZa/Hxo3iTDq5JfYPwEXyostCQ\n3iMz\r\n=HtoA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChx/BschStzofE7x0I7gmahhlq/R1D8Vu4Gv1+jwl5OAIhALN/p3UUmn6KWAP302LmdNRiAqR6/pTJIf4rc2A+4Xq2"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180810165309_1533920120111_0.3607647207783189"},"_hasShrinkwrap":false},"0.1.7-20180810165931":{"name":"@atomist/sdm-local","version":"0.1.7-20180810165931","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"bd90c5ca1fde07bb5e5821ff582609b31dfaf935","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180810165931","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-U7G5+Vhtv4aaUOHzXaTf9LW7w/i3JT4Vh+hX05GVFXuxVkiuFEOivu23zSXCdSGy/Mym34172nJ2Ds65V9wLmw==","shasum":"873281d3ff738f6ec61ccbce09c4c804f8aa727a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180810165931.tgz","fileCount":316,"unpackedSize":954133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbcT6CRA9TVsSAnZWagAASBwP/Rx4tXI55Ai8eCJmMCpm\nU4sWhh2r0bUyiNEp6TGhDzuqxXqF+tIEvqw3xanASnV4ODR1ItmDGIJ1K/zx\nqDc1c45xaHwyPHFBaos43GROHakAb+gENjYDd9VlW1Q6IGKCWSOWR3cZ1RZL\nDiLjaFF5zQA+K+3OGeZAbXNUtSa3y3VRB9/odyze0vmebnFgqKCtON0o3RCv\nSiF6YBFAKhePJgXDMsnSI+m96QVXRCHHgjM1p3gmJPLaYBVHp7Tcihct8OwW\ngxN3H3uvRWDBAjCfHbjDgy6PMF1kX8/xbsVkr+/Hj/7T2U9mFa8UP3OsggyO\nEUf63aF5rV88P0WEJblU0ApI0yKOuHh+BoqsuPRdx5c7cwASvNdsxTiDblyv\nynOGrhhVHAH62R+98P3Spv+N/rdXTTDNKTHjsr7hR6RZrXlEXlkjju21P6Bd\nWmotevOwUg4udJ87Pq3lxX2QxkAdwNpmEajkds/xKMrJhn6CMeXpg5jpgPk8\n79s4Y2J+UYWpV5I4IpA4Y/3DkMsL5kxyOT+0gtO7cjlFTKMw+bt8e4SpwcuU\nwdI621fOgf964a+0R8D47lVhvutPF0TtAda184tbc4NfFOsiTnZzfC62DBrq\n0lzbZh+fR6qKpEH5b1/pYsHrKelf9W6xUBg7wwf39bqoMFCQ8WiSjRBW5Ptd\nRRZt\r\n=KsLM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF9EtKlsb6NcwlOzoSAJqluS7nlyAJmLkplh9nmMKPBgAiEAsqTrFd2/p3mz3vJ3v/gB0exHoYVw3gh9CTdDS2f1gpI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180810165931_1533920505426_0.6835976223067848"},"_hasShrinkwrap":false},"0.1.7-20180810170906":{"name":"@atomist/sdm-local","version":"0.1.7-20180810170906","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"7aa09da0c27b8f32cfdc4f7b17ef77977f233cc4","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180810170906","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-hGCdsddfz6qRd+vsrCGyrj6eTc/aZVJkuW4ieCcwmYEwRyPH9a/BOIvaBZ3Ny6IXLeXVdAjTc1NZ3Y9l+dNurg==","shasum":"fa85206df173c86d5682b799de65500f31e2b8d2","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180810170906.tgz","fileCount":316,"unpackedSize":954188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbcc2CRA9TVsSAnZWagAA4K0P/3mJP1gE6Adn1QG0FPCN\nlMUHOkELFZzsF8gPibJ9YMzX2dU0khr1rqKsTaV6/Uwps3bPydottwPdl4iA\nhy/8cHEf2Rmv7WP1+o4+RJ3G7cMv3GJkObFg+nLj1u7Vu0rxuKJ1txSVmlAz\ny3N0UnXKo4JpL9GCIaVHqrSG3Eg1t/fG3Cx1tXXl+8PHE+RgvL1Wb7tnsVo4\nVJx+7i4bb0Dxb4nXxWt9s+vFix7qNE4G+gCaNUDeatPdxLJGs5MQtVAVq50p\nymCZbzFQ/BT38LVkoLRxwRjaEQ2wtYIbcxYnNUmJWnqGvw8xq8Lo/tSK9dKp\nmQgJNTd9Rt5i9I8UJT6oW6XtlcJjLojGIDmkpN3BiQtOac39RXBxKPemqEI1\ng04Wa+x9zsdXRR36k7iWZhCL+mhQk/yNsBk0d9IT5T2YXFNzIZSdEqgX5LrY\ntiOwLoo8cZvLY8vgbqGTfmhwjBQRObQ9sd7qhrs+F9/ihgfoQsLURzg6UcSM\ndyvl9d3mHTJXhbMXjH6bLZ5IHbYhpv/TEx4rdchFG0aAoFl90LwyunyESEY7\nogCGv8IXqkRrrWahVMkZ5DBiMkU1pABx4w7nrTYIuDjWPLoNn/iidmjyKJHS\nNcpl/XVt9li5fOsOh5lnYl6Q3Fw/RHMOI36heIWvK29fKWXhbjFEVYQ1kvGR\nFYZ0\r\n=vRpY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEJB1gic1p87MPihzk/fLn09pJIg4d25M0IkeGO8llTBAiEA+bY8mOYyM/q8CBxtOMDZsapSUPm5eaS7H0GZ+E74Pfw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180810170906_1533921077640_0.6789030842575501"},"_hasShrinkwrap":false},"0.1.7-yargsaver.20180810201651":{"name":"@atomist/sdm-local","version":"0.1.7-yargsaver.20180810201651","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"25755cbf351dee2f29cc668e4252a5c094352885","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-yargsaver.20180810201651","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0m72HVgLuRxzqz1qAhWP9HvTyl6Etb5XRH8bZtJK35gXuHMeRay5UXgXwImwp1KSbh4UB6n+mCSFjKRwPC9SDQ==","shasum":"c1a935ae267f6d2a2d0798de5105d61ca509d348","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-yargsaver.20180810201651.tgz","fileCount":325,"unpackedSize":987659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbfMbCRA9TVsSAnZWagAALYQQAJl7G+fiik8mkuOruUqv\nxzWU/Vdx7xJMbhB3VrTQ62HI77bzo8QBp3PwavMRYIkkLrT93ap+ak9OFmHa\n/Fhh/YeSAuUJXOA3+QevRJn7g+zQkzJNpUDJjRGBEpzAY49Ihz4KgFdyh3wL\nHzmJs7vKRWhdHxORzxZaRN3JZg9UzeefdyGAdmPS81YRPGoJE1bA6h/Jp6AT\nSYMcSWpfk91AWXaiIVMR4Vh15/bjUWKdSxsg4a992MAvuq0iRE63bFVxP7lc\nlU4TrAyjAmUCWpkeE8YNYPbZbzBuXk6jKAXhRIAdNTj4iVCRhekqgRxEoPhj\nfQ7D3bJAjUs7XAkhgN/9M3UZUqDwGUGFHmWcK9YQ4f6h6P0KjW7A7UUe12JS\nNB5ug0IU5LGCqJGxgn4bM/4VmS8DVl/WKUiFHFuwhJSTIhNa8UQXgKbihA87\nib20iuboX2B1p9VKzuUhYlzmATIAGycTIrvsvtp2c1iuxH7NJBDDAcgkyo7v\nEMgRlfDB9IqPYzYRMD3GKg+fU6voYE3pFPMDrGhJ+YqpWhjaFypRMWmlrwXq\nYUbAZovHd6IQMyL+3yKM8yew1Z+KmO7rfrNXcaDQjRVMzYyIj+qr6mT998it\nd8JF3Qsto9FiXNaS6EfBzvepdBh3BvrVT9yHxHF6SA5qJEHcTMl/EDS1usgF\n19dF\r\n=My7Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICU5eJhRkLnNXuSqV5OdGzl6gJ1JbvJ4bneEr6/uucp/AiEAlIV49RYmNcXjc4IQKUcRzO5/woXTFNFEgrWiAI4BX/Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-yargsaver.20180810201651_1533932314903_0.34446890353574666"},"_hasShrinkwrap":false},"0.1.7-yargsaver.20180810213117":{"name":"@atomist/sdm-local","version":"0.1.7-yargsaver.20180810213117","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"7ba6758169f53c1513a420d7591578a96e0dc4a6","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-yargsaver.20180810213117","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-uamilmVXc/gYkmR0Uy/xedJx2KwvKrcd29BsRn2fwcIzp0GsV7uQLbT4M/+IBtkaimBgb6Bxh03gWt4yiY+vrg==","shasum":"8c08d686b86bcc4469b35c27c8561529d2a6cfd4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-yargsaver.20180810213117.tgz","fileCount":322,"unpackedSize":983422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbgSaCRA9TVsSAnZWagAA3iUP/2xqbFdPURgB2aDccfEe\n2c9/0C+i4A2eqpJ5A049goMhEx+tbo2/JKcgkRwtA9/g8zLLYrfmtkCeZfui\naeYHctJCHNu/9iVViQgAQGUAEL5HzMqbRVBsHyGgWAKOqRB5AIYQd+lrVnz/\narawGbwX5yBjUkprc8GL5IAadGajowGMq9HDcuwZ+Xn0bYMEcbW0RvGm4y5b\n7XFePFOrIecT8HIVD6FLgS17vhP2pTMVvLBCPY1pKJzY/9Xjnhrc4LJw5KCC\nw//JWNus436WleT07qZt1Iy3x3JkHqkpV3hHrIjmW7Vka+Penpt9yyjSfHrZ\nJipn8h22x1cGvJrLpYQ2TUvSjShRRWZ9kWVSifG7Mkv9bKukbRyVMDcYXW2v\nn8HdE5meCBvtbRGa1/KvTFyuma3BGeu/tKaNEhhonh3bMli25t/tdxAwvxwV\nHBZ3ZSiEaSDOSb2GhIADq1soa/PC0es8VbMYRAXD/xqOHNPMpgScoXc0qmFA\nIQ2UekTQS5AFhsKNT0zT+NYHTIiJt9RXA/zyQx5koBYcsknGqCtH9kjxi3w6\na2cVeksg+DaHznWFft4bJglpMcBTjld/jNFDu1NtgNnmeBv1aJQCBr+fIeO0\n7ByG+HZGV9urf2L8de8z02aIr+/NnOIIGmcRVfZnEBwjkIu9aXMgKSM0wZdx\nxPWk\r\n=T5lG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHXJIvJgAd4+MiWmdmUJVAKLocEOEBWBvh4PZi5b+CqAiBSVJRR5z9b2zY2MEPrGPKrb2sL4qVON/E8jP9bW4botQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-yargsaver.20180810213117_1533936794225_0.5354156022541425"},"_hasShrinkwrap":false},"0.1.7-20180810215423":{"name":"@atomist/sdm-local","version":"0.1.7-20180810215423","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"70f386f3b0536ff63bfc8e58d0ef5cae66330d97","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180810215423","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-cT4t2NWEXaZHbF19relSrTY12+7fPBsDf9BFvEWNNiBogeQbSlq1UTJ/RbtQ9KRryXVcimkQe8cj6QWMHVNqbw==","shasum":"652e787cdec3033e073e1020907774e3a594fc8f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180810215423.tgz","fileCount":322,"unpackedSize":960624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbgoVCRA9TVsSAnZWagAAucUP/A1F3vx9No+znR4iwqFC\nGvzUIUVLRQkcJtoRfAYmZac9kSJLXM1zr9DaC5eTNWwIQh06LZ0121BQzp8+\nTY7OvvVcU1qKZ0Pnt//1l4/jWdr1Xyna98ZaHvUmoS2c3D/zo2msszUYtx6e\nczAqoVxhgetpdjtLGZcD20eHpQC9XX/K8/ZUc38jTJqwGxYFgXQ1IL1dnFNe\nmq0IEjmphju85mGmPk3Snk5J437lhRBpUec4lS2Ox9B6XxfMIaXPdee3FiBx\nMVDlzwB+viuwMkHimJtKiVLoccTMtwEHnTVZvJ3K/VD48P0BH/pkLQpaaHuq\nGgTuI8Ev5YW1wjR/qwD/tqPjKOfN6srjnzg28CYwjC8Ls5Y7cLk/0kvqBghJ\nLq7Em3c/TmseWpJdJSRaaX2sP7YPO++E0lqx/WEKyrL5r6bc75oBtfPS12wL\nI6PxwrYsxJRq6w7dz9Nn1GeXTdJKcQ1AMjZRDNKYd6Vz9dKKjzKi6FZgmYDL\nwq8hVz9KSDtU7Ts5gFKiW3xZ7OqQ4Vpr1CpW0RDBmHrvjRnBcvuv7dmAscLg\nnNNp7YJcdNue+UYP6KKy3c3PBH/JCsD7Q8VtIAB7xLUGoag//n0OIvIjDFDu\n0rbd5LAazDpUTGXCl4OG9YZd5gedEraLv6zy08yZ+KAnOMVzbJzMUaii8rBC\n0hka\r\n=cZdU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDU5fCA8K5F8dw4pat+Hjj7j3gB0sStYwVHNMNsVlDI3QIgLX6jZPXxlQNrAX19n9tdhTExhwufbC8W61iy3arbgYA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180810215423_1533938196393_0.9351419644445114"},"_hasShrinkwrap":false},"0.1.7-20180810220215":{"name":"@atomist/sdm-local","version":"0.1.7-20180810220215","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"c2400d637c2464a8542eabab672f7828e0fbf874","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180810220215","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-oxwsuB5smEMALrLGUPnUMosLTTTgnbBDNCEukrc02/sB7qYfT5Sb5qj2zk7/vz9DO0yULtUulNu9XLAdPPsspA==","shasum":"ca6edc2623fbbacf912da22797ecc07bb99d096f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180810220215.tgz","fileCount":322,"unpackedSize":961167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbgvtCRA9TVsSAnZWagAAkLIP/34xSx8HSg73mqxVZ6pt\nLaQjTmPExdHguj7K7/JT3Sxue/nZrqmdOc3sYsM7ac9sF2tZybDD6Js6gHrL\nx58AdKBKrae0mALNlQXGheKartADSfjBm0xFRS0COcmbmCWcvaI2n1Gpx8SM\n1Fv5KPNWTWI4h90UBrmv1j/FrRCUUTNw8YMNEd/kK6zqPXOjiVL3EtmRQf2d\n9U0WpUPA46KHim1rWMl6OCscTpZ0sTgGkMcVWJ0ZFztJ1THgIGSoVbQRQCKi\nwNn4phpVNdr15Ezuj7AmarCKCNwGy1XpUDpchQz43xJ5Pzf1b7tyIKoI4tNo\n2r59/6Ys1mvnhb+a86raDFUstiTYBNYCF12pRYSldjhEB7NraoC2Y+S/mj8C\ngk9oJgREUNNbOyGLhTiQi3z9w6c6IyOekOX33R6jmBYxNYo4tfEcsjE7uQ6i\nQHHsIYA+LRiDWEh2S14S57+nv0tBsQ/VWzvkSxULEr6D5s4Us7qU3T3Yo3LX\nu+oqaOPomaVjdswIk42B8cUJvpmHhZ9mfjz1b7y15SQfscSQucoazSm/8up4\nKk/PHSSdoY8pAK+Nmir+U9CS+34/gH34u1+n/qGYNzTtv0V26iA3zOu1L6O1\nHwk14ujoNP64yKE0hJv8Ug1UbT6PCahDAcEicdAjRkxfrS/jUCpF30UniBVJ\nLNCh\r\n=nQ1p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDYAD7ru+VeBBMDI+pZ6TyzUOVUQfVRxAhBswfv3m1LnAiEAzLzHLlCi0dBJ3AVOP4cvcPzNlhtxPvwZYztjwtDuB0I="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180810220215_1533938668572_0.3873745141691052"},"_hasShrinkwrap":false},"0.1.7-yargsaver.20180810221147":{"name":"@atomist/sdm-local","version":"0.1.7-yargsaver.20180810221147","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"17ba37b4eb8ee9d3340b891d4e7235dcd0d4acb3","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-yargsaver.20180810221147","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-FFpCH4QYcfj4jon4FK4M3Y7M5R0iO+/Lt+Z7qXWeCNn4ftL3pJlx4LEaKc5ZsSIhNGMegC6tT1vAWzl/msxnoA==","shasum":"322fdd7084bdf6f5997e2d0c3a874b456b651e94","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-yargsaver.20180810221147.tgz","fileCount":328,"unpackedSize":990488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbg4NCRA9TVsSAnZWagAAouUP/iz9/Ile6uWy2wmi/jwf\n1NiDax20EXJI/PIQ5PDVJhxvSuHlT2WbUa7oOSmNiFRLTSHgLRZhLyz4ouyx\nlKTZtyPWrvdHW+ifD0gb0eK2soZJ7+Ms3TwQ1+uhLcHg+dTkf1XKBP2YOllk\nxGqVPPu0sfrM4zZV3XGLrvC9ol+oeWKbt8ZgLinuREQ6IDZ8wRg8DFHziWta\ndokAzJBFI4smtFSN02isCWrT7EvQQ9UNLx6jqJpqk8qi98Rdf2+/LpOXK5+U\nVFImsO+TakJqkkS1718tSt2jOCsUxKQNz91/JylLG1BcmPUoNFpUs7DS3vA3\n7OtDtH3/QH9XoG7iPP5n1khJ5zOwfjN6p00Q3v6e/UvYT8CGYjUJOGiNJafB\nci2Ap/pJvQJuB0CDI7mSskt7VT94M60LeSqIC0Jnu4GsPdLI8oF/IW1zDgpT\ncJYR4Qe0eRsA2m9DzGmlj/+MvsGWQk0ibzkQaQno9q5DDzcxI8Ll+ve015Sr\nSVS1AFzEm02hPa6t1tXBMDTJeYc9g0Cm5F8ilxk0AHlOjpSwYOMFoponk2to\nPRrM45VywPiGjNYwr34ZySFl2GPPyg0FATSb5Wji1Hgh7ptdDoPUACzwTdFk\nnw1bOGM9NfaaPntZYrG4v3nfZv5525FPRBNu2OF8plh+W/iGzfsWiYh3XXAw\nNYgV\r\n=CzUc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHrHmce31lpq2FXu+/xuS1EQ+M4hHqownLG+fC8yqO7gAiEA0E6L2mht/HCgzOjAZgbJxICN7AzMyIrj2/cpH4R71lQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-yargsaver.20180810221147_1533939213347_0.5164686451306353"},"_hasShrinkwrap":false},"0.1.7-20180810224846":{"name":"@atomist/sdm-local","version":"0.1.7-20180810224846","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"326981a70cffce43cfa0fe467043053f6d12e535","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180810224846","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dzR5hTHorqFDjrs84y8mnuLbG3L1lv/oK5S/BTG4oy3colSUiaBfR3bILp1MSvGT7EvcINRFWTJMVV+iKFd8ZA==","shasum":"5e806b9cc36b12f08c394819ca58ca98a7a243b3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180810224846.tgz","fileCount":328,"unpackedSize":990478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbhbqCRA9TVsSAnZWagAAchsP/1vWFF+Yma41RQZDJ6Lq\nl0o6bCjQISNaklpTjGHobz16uzJrut5JxOy1c2z3UA+FK1m9PesJ/jLAxFy+\neDI0yMHGFBSwakV3kbwsKkIOkzpnKIfEYT+RVzwriEmZ5hhZOzsLOFgXf8jT\n99Ed04GZNfIiV8lPQZmwRZuvaUhy4U1+8wHo6uM8GDyRyK1U2aHaMUoZSqEa\nSJmGcCwrOnVDQqimhfUInwFk2pZBaIMrF9HjO7EXffwcQYuIAye20+9zIq61\nm/5sooYCsO/35HofiPIq6LnXlko2UiyfNEJn/jxqMqfA+/yaSLiwgN55HzuF\nKh9N/jyyDmPDHx5AWV8yTxZty8Ds5pPiktI+0EVHF62A1RANvReShsfppZBH\nZwNr6BN70eXwa/DG+YY1h5QBT6V0ma914ZPtShbw1Q7iCOSNmtSRWSt3Ng3V\nCKtqPFQQIaovL/9MmG/fHuWumS0Qqyyde/YfF33legY70AXF1XQkjZtE4Fw0\nAEboS9s0ySjxmPVAwhyKxmnEv0ux0CH7Q/Fm8o26JEPaNaq6olB7djVHMgqL\nfeb+NYS2Z9ld1g8b26MCkS+ujebb9nzCgKsoFx8VP7qHteXpwuvcAuoqODHu\n+ZWm5m9xpRv6brBqvkCaoeQ20r4SSJQmzPHipKCxqQSzAayZC/mUf5iO6b9F\n/8E3\r\n=T02e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkwz3fhQ/rN34WJM3+rv6DvVkJCtkgRvMLJd2496EzhQIgcVYAg6n+V9SqNuU7lai6p2BRV/RjTGGNJOtM55m1ZRc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180810224846_1533941482072_0.5635655309674368"},"_hasShrinkwrap":false},"0.1.7-20180811011838":{"name":"@atomist/sdm-local","version":"0.1.7-20180811011838","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"bb2ddcee79efbdc8ca2a1ac211474d788c81c240","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180811011838","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-AVX3z/pBR5qOXPm/io3x+Jnldab1REpbOP5xEarTz9Z4lpSVwZysqPlFxylR+t4iKLdL3e/TRJzqautsQOk5hQ==","shasum":"4676ee5b52eb78ee7ffac41cc5218ff58a125a1c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180811011838.tgz","fileCount":328,"unpackedSize":992214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbjneCRA9TVsSAnZWagAAZg4P/1PxvEk6oJY2MtqZPoLD\nDkQb0vQK3ytKIfURav10Dti8PJfuAiBK7XqSmpObm1vF/qqCZ4Za0+wVKI8z\nXsLEFvQCQ+A1APk0LYlB7stifo6g5eb9kvo4V7kpxZVsn7Zbfmx3kH1Lh8va\nycw9koINtdIHaL4LrX/m3MiLmAMO7/CMGoqIJLFiPJfp/onLjFvvteS/qMuw\nmD9ZmI523pg0QUW+P1EphWMr2ZfxiAuwKIRg+pfkaCh1eScnEOhUp06WCog0\ndLKuNPOM3lVyv0d2ykFYwqZN+2yMJO58oyfhRF5I02c83ZZbsxyv7IQuUl60\nyjCkKdOU4IbbnUhzj98lmH2Oaj4SNELI0/yIarMKR9KfiRwFemQagnnGExgM\n6K+ze/vObX4z3m+w8v4lxPh/DtKySfohzVUnxo9/Tb66c1xr4OTZ1sfmn7U0\nS5dQfMlF8VW73anm9ZCYGVbChFe2q6XY1lPEH/haai7/IxOf6ygoePdGpK3f\n8wQqRE639ILQ7lYMgLBSdsT1nx6oaHtDmo7Ut0Kq/AmVia3zvwbAk4da9Pb0\nOYguvFBuAKILlMJodsYvcwEN/nukZveFI1KWis4+mPCLJdIETByr1wNqUyVZ\nlILgY1xsDlbvRqp/OQEhiJ3GCnh1+a/HOFHiNXr8qGPMXX8utrAYLqG9J3iF\nqP2L\r\n=82nx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5EU4xX281+Ci0IEKQuW+vSf8yGQ/DVcobeMZF95FVdAIgXUbrBAiY3RTl/Z8KKRHkuStS5lzvr9dSAGKAVE/jkVQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180811011838_1533950430047_0.38063575091698976"},"_hasShrinkwrap":false},"0.1.7-20180811031646":{"name":"@atomist/sdm-local","version":"0.1.7-20180811031646","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.0","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"2ecf1900fe2eac03518dfe74f40125da8d101e33","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180811031646","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-3HaqpNpx1oJj7tx/nvxQIaIJ20uTr+zHN66TUVReUNRYwz0mHpuClA9jQsTJ2ZyUu2Oenrh2TxhAuyD0RYhzww==","shasum":"2d062ed60562a5c095201487496419921685628a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180811031646.tgz","fileCount":328,"unpackedSize":993479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbblWiCRA9TVsSAnZWagAAToUQAIv6KaY7RWLkEM8UovDN\n5GC4dAUAwwytPUb6FHiRtyLzyyaaRPqBkmsYt4qe/s4YtGdXAfwGAuihBUCh\nmI1XJ5qyuiELiagGCp2egpb+/8rTrKJJuvHc68tlmoOcBFXK7ibw5PMIvwAM\nj7yBW2/MtlPuBmUcHpjuhZICOr1C5j2S6ocezwq8GRhf6RjcdkvOY6Tr/8OM\nxrwC2Be/dUQwPGrOGG6Vp0yTFRMAEkQaePF3YfQ0zjs8xCIakKAvvPWhpJrn\njuQ9y9elLyz803juMB4NdhhU34c6lLvsu0YHOGLAs7xO2dO4fUfTVGtZFfkt\nMo8QVSX1hCQWrbV6vLK72iUavKkfAB5FP+cb4+TTTSexDCiNTfSoMDw9rJHS\n21a29q8eWK7H1nGiotf8+927vnCWJFhpPR4PCYXcin00DVz/9BcbQSgmi//3\nTpDBTg6//R/5oYIDn7xgVqyYg7tWmLtUDmqH+qIqRkw0Ob89iQIuukGIOySi\nRyGweHePX3vkz5N1HbqlWQzj/hmQzOeK9QLfjFQ6on/JGYO7LEtvt2QvmMug\n2sM+UgCbsh5TFqi2BIVFyfkBIBgAej5HTWULdTuwx3NG6kDEbjuRTFFoC/xm\n+sRsmLoMTe2Ead+Fzc+pLd+uex3BfXwCUxXvPLvmkMFmzkZZo8JoDwxpMDN4\nS/UQ\r\n=9MHt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg69/iyryHDWLhTGJkNL3gHhmA145LjnqobH8ZKW3hQgIhAMjXJWtMVWoj3TtQDoG54J8PmiTVXm0jQvjecRZRhOQk"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180811031646_1533957538081_0.6765950043303897"},"_hasShrinkwrap":false},"0.1.7-nortissej.fixes.20180811040834":{"name":"@atomist/sdm-local","version":"0.1.7-nortissej.fixes.20180811040834","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.0","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"af452921e5d09fab422845eed8f0a10fa8239ab2","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-nortissej.fixes.20180811040834","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ru4/CsCvBUZiTj/8J/poOGmDj7ymzSITl+8q1Acj8u00ekIqApGXGUcidiTu7LhKEU1sEd/kKyQKSYcUL8+NmQ==","shasum":"856a49c58c4014eb540a053f49855f15c63fface","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-nortissej.fixes.20180811040834.tgz","fileCount":331,"unpackedSize":997061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbmHMCRA9TVsSAnZWagAACIUP/3ojAfupBMIAvnP7/QTV\nDfVyzpYuFb5xfBl/S+Lfp8kokKJ1ZznSGq9RxP+oY5BaPFjUVxcq6CM9bAUK\ni88vphOwP38f1evIq1jJ+h3YcHoUsbcOumn+Q/MNQQ7j1su2W7TzBUrybO3s\nzCl2PJ5zbCT8hpVnFjsluKkZofN53WeOgKKwYsmQxcqaN42hDbqfl+A3ZW1r\n7s3DnA8rq/TmraQ9vx4uu5EFvnq6fFKcu7pZO0inUU580ZBZRm9BH5XqYAYn\n3O5pZL4kKiEbuCl9g31ZsdX1DuvCkfzVy3fiDfHW7V9kvJ0l5Z/auwvN8ePX\nF89SkPcW+M7Ass4krM8exJsdBtYhDqMCP2py51iaAAavDM1EjygFwPy7d3CN\nnCNMLa8MLXQ3o+Ag/xRaygSOYl0O37/3a7hXOrtFTzjhNNFYEJTw7TbFwyTg\nLM/pXLqCLnZU+iyIPDlYSJSMpvGTj6Jrc+eR8pLDBtenNE17sIUGDeRF3XYT\nhcnxP4QCMvKuAw0W/84f7FdSzqpEZ0qUmq1H7wv/YwU8nl60GHTo6/kh5T6n\nHGnvPXn2PH+tDrUWXqudEoEqp14TO4L64T5WCZaeLyzxcBQGjdnnQuzCI0c0\nT1hyHnqtN3OKqRYjw+MSpQhm9VtVUmr6d+yngoMNprkZPrnRWFff3rwREL4e\nHS4D\r\n=C183\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDyHAMTK8iQz24NsSZmFP53lqssmROBE4tJr9oD52gzQAiEA/nuUsjHTrp/bvCD2NHFnBkONoARVeYERlAiiZ//mh/4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-nortissej.fixes.20180811040834_1533960652214_0.13519375992115124"},"_hasShrinkwrap":false},"0.1.7-20180811041259":{"name":"@atomist/sdm-local","version":"0.1.7-20180811041259","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.0","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"d991e66247189cef52e2c61adf1e1009fdcf80cc","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180811041259","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-nWAjxj8YvNm0i8BSm8CBPIcq+98/63OMifPc2NgePCh3044YSFq84hUhbPhtqxLdRLg86+cpMrvK+fq07rix/g==","shasum":"f8340e767fc73f3921b0beac10c6a4a825033617","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180811041259.tgz","fileCount":331,"unpackedSize":997045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbmLVCRA9TVsSAnZWagAAbV0P/jBUrgLrUSqYy4QCnMG0\nFLNjmZAyYPdSEcqrJ2Ohux4Cm+zY9jTyG/D9vPuzeP5VsT/guupdTUMGcg3w\n1CFeDHFmda5ZwgxXwbQ4IaRi49GRooMjEEwWM25DXikrwfqpxya7RV3BomOI\nczqBgRMktJ7Amai+6ShdMCv6WgKktriktsOze+yY+QEUR1VCDxE0JXEmWyJA\nqcfLnlPZvwpvSOJSfTrv/BcwOFtd8o2AP44ceoHKTaJp5N3OVcIsnIDaixGN\nR41s6BWfN1/exwdIGpgtdZrLB+AMJRHi1bmd+wf1HE5jIEsDgk3z+X1qM5me\nv9BKTr7MvLl+kveRQ8/SSgx2tNp6t6ChQpSXOX2mc3BFMuU6NPX+zGaUvHN1\nJ0En1AdEY/GjUusXU/i/jLGF1eyz5HW3HF7Kf0RRtWlZRS1XA1CxBkS8M5m4\nX9MQiQTAsmdmsFuQiRoyS2DFYj8Q5Dg3X94Srn75lhaitU3OlyxR3U8nVT59\nTpA1j20KxzPl/AdkXBgEYtGXxwacKaoaPutZSoQTrbFUJaur3OihlcdofGAT\n4dDQBcOUxes50cEu7amYsWn3FYJeYlw8MNWt/OBehcxt86V2X/EDFo927493\nHX54E9Y8ETxg4dJ1iAwH7YPqXTCrpI4OznO77miGhDljUT9qnkhoAlPghr2E\n7x3g\r\n=3kce\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICr445hVRWLbbhtDRd1323MSvbaH2JdGaRyrn6R3N/z0AiA4z3K2lPCYE0oIpPmw4Z+Ezsv1c6dAHfVL9JNXpTNxQQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180811041259_1533960916828_0.5596572471662788"},"_hasShrinkwrap":false},"0.1.7-20180811171611":{"name":"@atomist/sdm-local","version":"0.1.7-20180811171611","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.0","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"83ca877b96972adb2a3b010948c01bbdaf723096","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180811171611","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-/HuHdru6OqIcC5OB21dsF4avk7hHuiTnY6PhGyS8H/+wSR1UvebDlkeTJxbx6oipMHie58c52j+Unofy+Nm1LA==","shasum":"7717c6569855d676469b85277c86e08ab658d675","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180811171611.tgz","fileCount":331,"unpackedSize":998130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbxpkCRA9TVsSAnZWagAAqxsQAIFElqUzjrOHUUOb42Uq\n1wXHDUkIJQmmMZ7K56+y/SZpJ0N9fBiK22y8tdQ96dn/Hf0G5USoBJL8kS1X\naihrquC8cKfWKOW8V1sX1NvLuMLzQvtYd/OV577397oyFYy/Nku2bqktTYpV\ny6U5wKVo/yB4TFo08NvYi2/JOOJTII/WG0/SEI/ju/xDyjEmi3heP89ffh+z\nzH8J4JoHoNH7ebZixWlGAS6YkRpOTPeFsVPkRC90Mg0QkkVxcJORGAV8O5Hs\nB9jDlcexGOd4R+xRfoEPzkvu9e1DhkvqgOzsolMLWQDdOeDolKBhqRblFddu\n2RCIj9QSyx7/leOJuW8YuleojeoHCbhxsFRsie89K2+8EHNhD07WZNBU+YGr\nfBbs57ZMApaxoUSNdyqtjWLNgUUeNG55aSjCNZvULv6YyT1BhDJE6/IE5hyd\n+jxnN1/hL37uwC+KrTrxmElw27i0vqpP2EKmWx1nG4Q/v0nheG7UnmLcysg7\no14kdn4lezpKatk864l4lzmUX+uShGlj3WjVHttiOQufnGy8sOnJwuv1C5y9\nP0HUwBpzN056nKe2gKjoPIZhBK5FOL05AGxzb5SvxXqAiUqMM8lRP6I/vC4+\n5AOwZiPtKI+gKqj6RF0VpLDShKjDImhE8HKeXxHKS0uCHIHj4QPC7/8J9jXV\nLlg9\r\n=4KIT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6BuAJ1GQ9vKst4hvJXDbXBsm5dz0CpVrZ9+34pjsRdAiBL8jJ0KYM+Y5madSQy7V3TDk0UfDGNYFaH7FlJIERuCA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180811171611_1534007907713_0.5524346840621641"},"_hasShrinkwrap":false},"0.1.7-20180811173739":{"name":"@atomist/sdm-local","version":"0.1.7-20180811173739","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.0","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"602f5a72b19818244b5540749a8ee72958902d2c","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180811173739","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-GLF9fUn/1iav/jdvHHjmpdSOFpDY7ACrcSU4JQRq9P87QJd4XLNZNuTUsNa7HFuZe5BBc0vYEJ4mAZ7ALFy0sA==","shasum":"cc52a9fe2baa616d5bda34111aea9ab8670540e4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180811173739.tgz","fileCount":331,"unpackedSize":1000158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbx9OCRA9TVsSAnZWagAAYyQP/jt9ZYDEkGORYHrbsnZR\n/xM4eWg7kcmJYVQET+HFJ0E725ffuw6HQamEDzcnCadTcMWQcSSyuhiIfeFI\nesXiSvzanVEQG09GcJsYViWRpp/v6s2DgSMhuiwSix4nW4aWmtIdJptjfaDY\nZcwe8ENaVEjIJojKoDqIicRdu0xI+EhbUkYDbar8zp5F1IDu6UzR2dfkQuoV\nlxCiiQOlgZ29knXG3lRqL01joSyxFiaWjwPGuDnI7Z9axO2CtGqbVy4RtLgC\n4DD3juLS13sjVJcp07zKucp88a9Yr70duSeZsHkMItvUNfqyHZwMXMu4CUCp\nVw0RD248W/taAvgbpJyzW43O8glNELtp1DtkXBKSpZHG0CVmoQZ0gUfZlzrR\n/Xrpx9x9M8CUcmP2/eZUaMQI2NeuZCVLhAfRFb1b5sSc2UQHUxlZ51kql/Vm\nNx8UMpF69kG26AGr3+dd1DvlY58OdEAYoYkocQ2FfqSwWc7ytElmrC6jcd8+\niBGw9I7PguDAww6cGWoB+ON3IEl0mA/bmsCwwpn43G885/+FS+cq/KCJVi41\nUSwpZgjx1kuhcmLDraLtL48G2liQbfPheF6TH5SlGp5pwx6Np+Oz2+xiYQ6a\nY7SrOoi/YRrGy/k55hKHtw2KB31eDEn0j6TziLMHNek/tlFmQy+t7GQWr5nc\natWo\r\n=co9M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUAMVZ7xVjUwAX9cgp/Dgl5ry6nbzdFL4ZeIYtxsODFwIgKvHjdQ2ys3dUTmhhDcLsNUKMglXD8PJLLBAN+0kNbsM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180811173739_1534009165431_0.002398840685677417"},"_hasShrinkwrap":false},"0.1.7-20180811180736":{"name":"@atomist/sdm-local","version":"0.1.7-20180811180736","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.0","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"7475a89f77dcaceb99d3a69f64709d744d621e8d","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180811180736","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Q4nym0Dzzxa3QvpcaBoy0YF0GTv9kMmJavOdghl+7Ybx9/wiaTrVS8MDbVVc7bqzHQpJi3WCpvaqYX2NmKy/qA==","shasum":"76b5f4832ef5aa68a1c6aec809fc665ba820b72a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180811180736.tgz","fileCount":331,"unpackedSize":1001198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbyZ0CRA9TVsSAnZWagAA9GsP/1uCklmXI3zShuCjykwy\nNqQnkkVmeM6fEY4Z5Ti1gkiSwmlxHCnBxq5ZfcrxtlVOQoHSQ+udf5ANaNSs\nqPQmbtPUOtuCg4U/ibIu3RbP9Gs3azdNXtpuPEbvteTNLlwlmCqilmOI5rG3\nkfvwbJZkxWsjkEC3xcwLAWVSPvYmaC2T5S9G/cZkUaBofLERHc++74AijPA3\n7FPPUgEm7pFKpCYnpZLz48SS3/UsXPhnIJiirqdu9/kvHr8AOmhY8G9Pkx87\n3A0ibWizHJ0A3lPIV8kDnS7L1ubr1EHcpR63OIEN4AgzoN73jJmBWxyL5yhc\nH1xWgVPDCikGuifbn+o8jQcUtHyF7VxcABXk6KMcg5PomqREsqII3QRDdKBi\nn1W4agJvDOfeo77s1bSjuX9Rh58EhTpcJRlt1EsPA4BA0qCC7zpmVd1H5aiL\nMIXqqFafO2vFj0LircnPZRv7W8ZRr+XVXvqiCQob3IqLDxKerR/8lJOGFN5M\nbtrG2zL/cy96+S7U66j1UJxnaRoetUfHTXJdUlMPKbxeCDYY3umeBhTphhw+\nchuMrm3pF8ZOBFMyV21a/2f2ZQNWipgfxb1T7HFJCtKIpBIyF+UEmaX1osps\ne+vKq0VWtw/2xTiqOBL/DG6ifdFe7qmOoyFgRBZeEIfw70Qhg6IodteJiiYV\nU8hS\r\n=BIgG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpvo93aKuU3cyPiuhox2pQ5Rj61MTgZiwwyDFAaxh9gQIgQ5Plu5eFmppLRxg+0Dbk4NxDwG+qVvu1hP5v9g051WQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180811180736_1534010995863_0.0163305302906529"},"_hasShrinkwrap":false},"0.1.7-nortissej.move-conflict-warnings-to-help-messages.20180812184102":{"name":"@atomist/sdm-local","version":"0.1.7-nortissej.move-conflict-warnings-to-help-messages.20180812184102","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.0","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"2a5b45521365e46d062eaa8d63660ae708346e8b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-nortissej.move-conflict-warnings-to-help-messages.20180812184102","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0dEvYgv+CDDYZpsRgw6HOpIaDetk4fUpN0Y/DJVRFV0l8XObVO13YNjBkX8Nynq5i06Y5rf0VupuY/FDXpOShQ==","shasum":"838487128aa47958a94ea7331954b801d6f803e4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-nortissej.move-conflict-warnings-to-help-messages.20180812184102.tgz","fileCount":334,"unpackedSize":1003661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcH+rCRA9TVsSAnZWagAA1w0P/jBrt7/gYOuX/5My4sLf\nLEs4v2LqZXWOMHvnlBVRktQxK0KMv2bId00JU2cp8Cxb/KuMkpCvR8wpUk29\nuD97J/PLp/309fNPHlrrTMaxuZHJ9yfUnqSXveW6JBMZ2RT0gHE/vQ+SC4Ks\nZlZ6bGNcX8Z21TLzCMU1Ie14f9R5TR/QpMk7w8L8cEJ6nGoKFasvWd9XPBNm\nGS0xu6q+3JnNGyUp1GPVVd3IuJlgm7z7pcXRwxzEfwVOX65Kz3/475Sudv3O\nnVYntX5y8cLNGxeBk8oUhI1wvaap1fjC2qvwEWFes1rdd+snA7W1CD0TUTGz\nUzcOp/Ox4sUW4V/8zc2SSucIb7+SdjsImXWNBxJk2p3uaVQRzPKmv2Lxycvi\nhkrha+c5YJ2uuCyY+NA8XfTWw78IfEEDsX6KvlkY5MH4mO6em5TDgJn5IwWy\n3reojPk1nJy/1hskQT++/dtsnkJrywiXjzgRcK9/edeVdjSC0HZDCnjK5nZl\nufnKVNAiREXA9pal7kX78Gl1Z0o00sfj+6KQSSOGht+rdGEYo9FAcI+Fs2g7\nD+eAphZQNkHFGOTS5POKmRXcDxjxaaE2KbWuVZfQaYNQSvg26yw5ePl48Zdt\nmRXMptlbcmof7JCUGiMEz5Ye07dpStZKElBuWGUI3tgAms66jMh4UiDbxOXY\nfroX\r\n=FTZQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4RiawBisVUEXWRH46RNJHfWI0dyEcKrksqLi83rN6dAiBjagiXuUD6G3mDEOHpnk3eARQXdnLLEfjNGi0VFzoiyA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-nortissej.move-conflict-warnings-to-help-messages.20180812184102_1534099370942_0.9669945317334752"},"_hasShrinkwrap":false},"0.1.7-20180812192608":{"name":"@atomist/sdm-local","version":"0.1.7-20180812192608","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"85a87ec5425c00614498346b30bd917b429adbe7","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180812192608","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-j7OLxxiIk2zDmGQtn2cc+jTItRUu/Ycb5d6kedjCf6xSyPc1oewHL/OsK3PAKAty8c8bDWZf7FTOmT6r4so43w==","shasum":"973fd97dc7f47bb4491f36730be24057a7e53fbf","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180812192608.tgz","fileCount":331,"unpackedSize":999104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcIpWCRA9TVsSAnZWagAA/EoP+gLj74AbMQOcWe/HdwDh\nl2WJT5FAtLx0M1N/AJn9qlCChrTDrzmtNrOW81mRWr1vi0m5DlqdhTYGySo+\nTUOZPk1R3cVdS0BHVnLIZrWToSsjrQq14xzy553/O1DuRpK1umxcT9gOCFFx\nBI5TGhWej5Plf8bTo3DaOd8chmSBAdAqLBaKRtwCqHcKt3aN9RmnTRun2LPa\nkMrm5xeNNV/eF+8vuD/qwtShmaPQtuxc4mi0H1dKwuLgJ22ZGaRLJnDr4aAu\nIYXkAtqr9pDsJczIlt3cdXD2G144lssnPrrQRjMpu7zyLXepsW4fvwBE9qZm\nKI7gN5RUkOqckyaU32jc/7Y7iaGq5Nj/EBThrkyEtBUUXtDpI9u4tPM6PlMN\n4H3nvutiCPm4XOIOEpIl+cQqogeDWdi3FPCXTGMgyIeptPm2ANbUi3VhcFRm\nO8utfFtctm4V+/7wAswn2jLoYpjqD1Irj7MN1ZcbndleP0j0cRxfvU87HEmr\nbQGeqn5uQZz+lkkJ5PjsJdbYGHzi+R6an/WnKvJ0HBLdO1jroCpMbFshtMWt\n1Rr2Y7jcx8pCEPI7jpwpgi/8G5Qwk9ejuWieFLxOdCBZxrkIr/VoOJs73Ea6\nrNd2/uvigk4dxfqxBYmpsoqMOyKkXOFpIX7JDDkW8K4/F7xCOPQ6NAx/Wf1G\nwH0i\r\n=Lp9a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD11eHZHWYdKc2jaIo7wNNITjNq/MQlshBNLx+J+32GFgIgBYDX/zYFgeZ74s4r6Xh+o22bqUFNB8fnddp0H4QLjto="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180812192608_1534102101701_0.47517293634500546"},"_hasShrinkwrap":false},"0.1.7-20180813030811":{"name":"@atomist/sdm-local","version":"0.1.7-20180813030811","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"611b288f3a06f6873d7541d8de8f341fd02c3729","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180813030811","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-4QG3czgoPz/49VKxY1PHVaUBFhOk6s7HSZQYC0WoBL0VG2yLsDiKgzDwtqul/4lqhE3pDDIB20+XUqSKdxa9qA==","shasum":"08c9c8429c7d0b29d9b263a8a316c6719e0d03fb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180813030811.tgz","fileCount":334,"unpackedSize":1001517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcPaJCRA9TVsSAnZWagAAvL4P/1X1EfgggCl60TLXCCRw\nDi8LgejqTIT+dgHuMsTzsz+UlonmSThCqx5UbFFKzMpgEI2/XnRmBB4Kjjmr\nRn9FyieEXdcSQwpbbPBolqazwYWsXpWVTxsgYpbFzsP7k7Np+vf92GKoe1T4\nAD8h6f1NEeIu875vgBBb7OC4SqaxYI/uzBgbr2GGMO19K/Nb5J7CREGQM080\nvcpcoeX4K7REpPUcZq5hOEQZZTgftk8TZnr08El1kZrp3wiIW95cnKdHOuG4\nJJnwH5WEzqTztI2pR5TBpUToNH2+mSA8CVQBQjoDV2GUZHulVTWT6hoZ1iB7\nCJ1liBQEqrQ2sjTUlDFLTjolueeZ0oNbQc6EWXz7qwY1wpdNeCpUtFn+9LcX\n+9SoTABisuVrx/n7kBYAPIbWbEKosyHmR2bYyzC3/t+m4mgO4coaludf4ONB\nLUkEAtLgpkPRbj0DxvnijAVv4GqNo4coENo/P4PeBWUprN5/BUxBuSBGdR1D\nkq/Wa/tP/0QmCcXUjDQlS2981TsDZcqGKU728jOZeEw8njP9dGSJSr+yYJ33\n8y/WuiTIOEw0e0Ui2Fz9p28nialK69IXiJqifA8p7nZoI2N6oOVxrGxWREW1\n+hb95jwtn7n5m/bVtPISoxlKa8bDJclZMSQESHIQqR/0FVQvQvh6+79K0xD6\nIzWK\r\n=wKTG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC58wMuNDQu6fTrCVyf59IpY9eZpY8UjBdLkcGPhr673AIhAMfDxiIywcF6HLPbvJmczzIohV2+8JZGv5e1R62Tn5zJ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180813030811_1534129800964_0.34982849505921987"},"_hasShrinkwrap":false},"0.1.7-lieven.seeds.20180813075556":{"name":"@atomist/sdm-local","version":"0.1.7-lieven.seeds.20180813075556","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"9e35992d38e617ba629ac5abf1721491d8a4e335","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-lieven.seeds.20180813075556","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-uMfrERk2nndhI9GgXU0yYaPEK5sGJhHn6wigt36C7Dfv7x8AjH6mwFl9YUit9wOBjPjnCT+8zQT2EM49StZLnA==","shasum":"990469c6e528125a46abdedc621b3555ccf2611d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-lieven.seeds.20180813075556.tgz","fileCount":334,"unpackedSize":1001895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcTobCRA9TVsSAnZWagAA3/UP/2NWkN+5SAB2VMPBTgxM\nEX042g2SYyy89t7xtsW0mWkmIKxtnvu+frMH6b4B1WAI6zk/8/Yr+JhvAtNN\nVBwhoi7z/SoeqVPOe7a2sAKXUmpcmcxQCoPuWf/SAZkB6XWYphQAmsod6UNV\nhhvDZ02ITazx5NgjbGKx7+vY0UImNg7PDTM92MKwfW4PyfMvyefh8a37vwDb\nEe3i/DXTljZh83ATz+NZOnJs+EShMdRSQ7PpsAcSUCrAj74MEwMNDV1kY4sv\nWgVZNZISF4UbrKe168NHD+xrNySWlGrF/YTKvJScnPMDsZyu41HZZ1TSUOAA\n++BnhtwT2GOxyEEMUM6gHQDY3MX3ElN/x9ts5FduxMaMffxR64GVjdqy4MKE\njYvj9b4h7ouVODAkGUIRjkpfO+Uk19jaF0x9OgM/rm1dSJUrED2GKQY19YX8\nOdY734LplLsTjom5Qz35lYh5fQvytXgVScTD9HXzKQNhC8H3Gg7eEpYRvnMU\nVJoQaxm66Tp1vZ4JayU8DvfLRRw42d/D6VmfGROwzdiHXAusDOedGNfgCl/I\nHlDW4wN2kfGREhFL791CzqaLrIcVoGZgw1PbGbDpyx0CfxYX5MeTGoUwfPi3\nmSnJW+GJv44FbZ/6W+iOva5sIOiDCTxGrVZUdKKR4yl4ynXdVDZJIrUzqwTN\nafFG\r\n=87f8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC30o8qAJ2cvv8o/U4WISZKi+kpGAeI56Be2MHGFQDzbQIgChKx5ApiGoI9InX1X80BwVASnMlijJ3LPICjxIKMjm8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-lieven.seeds.20180813075556_1534147098965_0.4669720111961648"},"_hasShrinkwrap":false},"0.1.7-lieven.fix-regex-path-windows.20180813131520":{"name":"@atomist/sdm-local","version":"0.1.7-lieven.fix-regex-path-windows.20180813131520","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"3f5358bc22bf3b10a80fbc61f897f85eb463e14a","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-lieven.fix-regex-path-windows.20180813131520","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-hNb+Zfv9RCUe1VxGaN1KakPCBkslxZQWpyNNCn/O8duhyiIpnz2sntZqC/SRqSjkiMXM3+0fE19kOzGg3enFWA==","shasum":"8544fee566b849938387f2242c96d88c8332137f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-lieven.fix-regex-path-windows.20180813131520.tgz","fileCount":316,"unpackedSize":951952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcYTtCRA9TVsSAnZWagAA0cwP/3+hY0VYX08Sl4aIhrze\nHnzqInwk1aOIZpkPZZY4tOCQAeXpF3c0AXGEwitGYWbdZJWrJAR7ZPplkfzO\nkgEu2Hi5jPVn/h3QySpAaLeGYxly31dt88J+oZ2d6ZGjkUxBka9SU9oNUD7m\nG+Yy5oKxyvRufBaegKz2Vo0sYpehlKBy8fDnyNQewJi9H1fRv0rDxAyNeKGg\nfUx8+driUP/SlKlp6sYLQLbMJCJq9YhUNHLgrM7nHlA5o0e7PvnRoLWNhO41\nKfpaVXNL9GScY5mPir+y1U9Z/GyH0rVdbs+qYOHHjGyfvEVXTRzuKFWO76dz\nmFStcEcsgu8svEgDj0pJsL2wx0ExvY/VMGAUcdb/ZQiLRnW7/H/bbTAWrBBt\nOq2qjFWGySCe+9lwrUmDIP1+g72P2jcNjcZFfVx3augx1Swi2EDHHIeDMi5u\n42LRSmj/oz35oTUkxs5RXkj/6iiA4ufE6hVhnBM9ozpc9Cq6EHPvqlVSv+l+\n3YZFc7K1gBePJASTPRFQ07gjzQLLcbM4fpaFILa18Z+di0dsWFonWY5JyNbd\nSN1qs7pyOB+dPOogOWRv9M1si/q2qg4A+q8VcO8u6VP+0h3J4j+7Yl/yNm1T\nw957rBl0tF7ISbk10yeIU+X+BUaOtuqDX1gxvnFRph6hJ161c+iWp94EdlEZ\n7S+b\r\n=X1kB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHQDQE45MGTfrmUgnRBlM9TdC1av10AAaZhjtWXYH9PLAiAGbdDSov9c8XnrlUrzxDM+19Juf1V3MaxxldkV83Ge3Q=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-lieven.fix-regex-path-windows.20180813131520_1534166252622_0.7192505044884703"},"_hasShrinkwrap":false},"0.1.7-20180813175424":{"name":"@atomist/sdm-local","version":"0.1.7-20180813175424","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"aaa71d3385eada977545eca46cad0ec09446db8e","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180813175424","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-P4hzzR4QWssYBBsUXAx/aJNT/bz9WB+WsglLkNR54G92al49Qho+W/AX7K7YPQVchN6/MCcC8iHcmv3TH/95/g==","shasum":"f4b014ffdc883c8721698de3d1625eecacc3ac3f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180813175424.tgz","fileCount":334,"unpackedSize":1001882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbccZlCRA9TVsSAnZWagAAUz8P+wVc3ioNo0CXrIlZuyFE\nMZcDkNmP7N4AKhyMnWw8o3IhZ0aLmZ87008LMxckdxwvokvsjcVBQqhyloU5\nmZ/Pzm0vK/0wDpZSX3NItPkpig7dOZxlDSBY5mXTObX6IEYTb3jKnOPTZWUi\n3DGgi6z86g7JbMi1LQUReDTvk6gG0zlxpLeKeQHsstLXhhUVqTIT+BpCBhSZ\nXJEc6TRYZ66pwh5rAo6uV2p5aAIixWfQrrifyPshWX/SDQVt4ArzFKNn6h/Y\nGj1t1YbxQCXcxmaP/hy9nryv3tz43XOljq/EFuMAg+8QZgxmZ7/q3t+B7Jy9\ncqXQt4S+QipXKlZXtIucmsFL1vmv3oc1eO9/ROZm3fJ/9qMPwAORI37/WKts\nfNfnhXorc4+CmXV2r9eNIcxHTUwQyD4Pp6qLS2xnzewOudVSCiUOnOF32Zcy\nirGBE2CJOwZvChEV+qiE8TBxKDHzc+wc0XoxHr8EuYHk4TyXo+NdbAancrNL\nNEKgxMhKYNUSvBo5FE55dxvPNphDnyAGIEO48jc+kW8e9EhCqaUCztGGXl3U\nAmzPiU13eNclpzxWnEWqGLPgAN8B6qLMNhtN6Ve/01I0YONMqKHHI3d6UYkE\nFyq6TfqbQFVmXUlW59LG8XQAqpWe9Q3M4rh71AqD/meOQ64YoPnBNv39Dw79\nVina\r\n=G7nY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZmpFKpvzE1Icu9GhN+mAjp7ztQ/l5FfZDhN6xIAN8iAiA1DLHz8H+KAdEYlehmdjLk8IagGkOhJOlnYu7CcvEqow=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180813175424_1534183012672_0.34536320049787284"},"_hasShrinkwrap":false},"0.1.7-20180813215621":{"name":"@atomist/sdm-local","version":"0.1.7-20180813215621","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"8094a468935a70c969728ed875f49744f954f490","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180813215621","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-I10/8GrwX73Ft/6XH+7Oj51vM8hgj0NUihynty/EB12FJFbzED/BUT4isS4mO/0Nl7xLeNPL5Lx36PcHH3dy8w==","shasum":"35e29f65c64869f2b39787fd5706d5b009162a54","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180813215621.tgz","fileCount":335,"unpackedSize":1002353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcf8WCRA9TVsSAnZWagAAtNQQAJ2m7C5dnvH35u6GasIN\ntGkCrb5kH5y8oqqfXlYxOFgc2vJyQhmlCva4OpvTNvILchovqx1RJw2b8Mxq\nCxJqe8ecCeSrq5BFjK+S8zqYx6oRedTIa6M70SLPdFwIYF+4OsOJimSfqnRP\nnUS7BuEo8f7b5NbiQX/rWwIh5C29iaC4wVQBO7oAcijc3VQHWE/Kavv8rJdB\ncBZHqtdHibZGcLFoDtOFTfBTh/w/zuGqCMP/Bp115Af9r5FMNYsdegZf4K44\n3NhxupV8F4RJK4i8WAYEKu9l0VfFkWqh/25xxWOZoRnztcd5605lRulxPqmy\nD+8feaRmivwo10hGD9BhVcHvd3XYOyU6xHeE9uVYtHxkKjs1atIyHdVZXk9h\nfKQvYGfMz532k6ERNItmwdn9t8gMimse/WPFUVwvYjhiCJvSkK9yfCnSdT8O\nR9dOJeqFRMsG6i9sxw3ViE2taW92izrmyu5c7RsQe5j6C+IIf8PiLLv+UNSQ\n5Jjj7e6whAoKVop9ol4EpHqEe4GfAXyJlHN3FUT/v8itWfVlW8hcK3SstJE2\n3zA5CcR/gAzYW8aNEqKypMR0elhlDa6gdyUeastDlR1QCv+i1kp00JR4V676\nlNLAUNo6YJ+fwWwtpRCH0ilgfyYTsyjmQSAoUyU0kEPqTdxIJIm6Kjknsobl\n+OrU\r\n=Ad3B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBozZzMHQnqIeG+M0Dr/CL+O+CdmumPLxbna2yhF11gBAiEA/vNBZHFytTOjzuD5Kst1h6nl6jYnX2zM4L4TF+HVWDU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180813215621_1534197525493_0.8277641544715122"},"_hasShrinkwrap":false},"0.1.7-20180814003715":{"name":"@atomist/sdm-local","version":"0.1.7-20180814003715","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"c99bcef09653e33c00e0b8fbfdd503742bf97a15","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180814003715","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-4uYQpN2I+0A70eWr7ab8TpSJRNTOdeykcWPmCVwg3UD87evtzM2hRV82nYIBUa8OHVNic0QVDLSuEjNp3uZxow==","shasum":"71f39f2a4317d6c4985bc62aec31609a25afd513","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180814003715.tgz","fileCount":335,"unpackedSize":1002834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbciStCRA9TVsSAnZWagAAFlwP/3E7CiDUTi6LtahaqfEX\nPN9FxauRpH1wkhCYj7QjYoV/KbRy4PBeKmGbTQ5edE08UWC4fJnCmM4FdWyr\n37qb19Sy7A7JDRr71EnQYDZDqK9C3abX+V3prs0J0QzMClmCRacA2CBLT3Ei\nXAOHDnYz4i7v8ApIsB+mhFD+1z/O2TV1AbkesdgGiNp+SOuJGeN3Qc3Shy5l\nyinLRjjDmeLCD9Rvvt2fT3qWZ7QKjT2RTG/hrRKRn5BP5GNRyMvZhTmF9AGD\nzW0BljDjm1LOrMLq9Ok3GiOgEKZ0IWtAJw93ECWbLeBmLcVEo2ZsN50oTyy9\n0FI7GD4Qc1VoHsqDg7SdYqTtOYITJNRG/VsdPnS6Oa0XlvYvA9RG5nKjiMA3\nkVVMmS7HGJE2mAmRgFsSeveagxlmrO+GtWIhIDgGtCkHfzPH7U8CXmRL05kx\ny75fcJLN6yK3NMvr4Z2m0+zXXr/T414Ra4xwTfgEsmMu0Xw+hThbK7jbzsoJ\ngkcDwsbrcxVjxZUFw4zA2+STUHJRPxsuh9R2JNFGPzUvx5H/fRaOogVrvTzv\noOX382f7sDkGqSmeiC9yFNyd/KCksRJRo8zOYXIcgRudjtihOMptTT2p4krZ\nRZQ06NqxbHcd/YbVlYxufWdQgngSHhsVwLpENLqngciegLDkNDk5xy8X3HzU\nYYwT\r\n=GLWB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzDsL4ctrf8L5OEMrEA/IhcYbx40/qI8pVsbSzruk5oAiEAxttWoTxWNB7QFeWAiWnyeUWDTumr19RMVsc4gErxycE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180814003715_1534207148654_0.37208206211668604"},"_hasShrinkwrap":false},"0.1.7-20180814195425":{"name":"@atomist/sdm-local","version":"0.1.7-20180814195425","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"7bb967ee329433534fc083888e5decebc4633575","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180814195425","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-xlfmgidtuOG8Vh5Q0mAokhMHXb9cGlRF7hPDqgYWryJ60IEsmV+z0ffwMWKBKpNMYmNKrIiWc7xjoTPuMZ6jIw==","shasum":"94930c76ecccf5dcab19667f5f40d4e85d075f32","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180814195425.tgz","fileCount":338,"unpackedSize":1006962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbczPfCRA9TVsSAnZWagAAlHwP/i2M5KXiELTvx1aULNIZ\nFzuHuiyWrTyjovJioZqieLeK3YUpHn+tw4D+OaMkW6K4NwjeXyDnGH2/NdSD\nF5JfrxlvHjEqVZcc6amy9L+niwnF87Ar9w6lLK/i/nGuZE55/rBsRPEZ3sjC\nwKJjrghNfoQ8G0Rx7QT3QNtdNfrmUcbvu6Vz72vhW2P5twgMckeQPj34kFJG\nNGDrY6VnxBncwy+iqkKSf19FfGQaC8Z5BZa4qc0RKjMssDb8nP1nJERC37Ti\n+qm2qUyDaeKtq1ytCI0d7wSM1RF29bW660YTa9m/Mkkf2DsPONMOFcGo/onq\noC/spM3Hran5U8EMXXanbYNF0VN1fuiYdGY03rtAJbUxYkiaw94qUOFTLx43\neiRYwn1bn+P4PxXvqlf20rLI0N0e27fKubEpC9HDEwImp7R7mHSvVbk2fi/D\nPNItkFivx39EKX3c1IfNv/BL+rSeYnNolyrxCyYnhg0/X2Qk8TUwZ/Jzq+5Y\ndVBIZdVCZk1jyw/JeMjLoFv8euYzhIr0S8z+HDjxRI5H52CBQluIq4pLnPy6\neH+D3ve9Zd7fH3Ldzjw4PYbdwiojVKeFPLIyrQ0ec6Ij/8vDBl6gIzqCx+kL\nN3JmG1JAsV8jiDNe8hSjsnKLW3K6uvn87CFvW/G1IGdTtbqWPeGfptd/knRk\nsUyb\r\n=aYUA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHrYD1Qte5ZRSxuNwJxHjB/PQxJrYqK+hhFzs3K1wr2AAiAYHq6pObt3XcQ1c854rJr+SqfSS+dy9zdsncTSh5+tHg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180814195425_1534276574889_0.9028988658684907"},"_hasShrinkwrap":false},"0.1.7-handleDuplicateCommands.20180815130328":{"name":"@atomist/sdm-local","version":"0.1.7-handleDuplicateCommands.20180815130328","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"5b058febb2575fb001631cb24795614ee7e2e83e","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-handleDuplicateCommands.20180815130328","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-q0yZg/c1dAQd1QhROZ+FS3BEHl+NR2gAFVUpyQNXKy57cyLgaZxRrTg210kC7W63d8dd8BABwViy7FwJ8F/MZw==","shasum":"bc33075dad9b7068caf694bfb9e4f62d4b235371","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-handleDuplicateCommands.20180815130328.tgz","fileCount":350,"unpackedSize":1022147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdCUvCRA9TVsSAnZWagAAwCoP+wVGvkee1GdOvC3/EkKB\nwAzFgKQ7pOgqyvLLkWSEVV7SgY7DBjzk4A6g9tVvYHBUhtNnYLcztNsG4y5Y\n4/iUquIu56laOJk/Q5ASEr6SOUmYWTIFVLGSwMy+RAlREpk85ievr64JWVDG\nTnmQb9IHecPe9nsD8wcH++kDqB2kvrTuQofu2ny0cs+rWlaFRh6pDfQLngoP\n1wSmSe/UetJKEXcuxAsT1LlMRHB3cH20fJcAGX81Lcv7ir4Zu6tocyideBsQ\nVEF770ieoOVV/5qqIQBbiJyx2HFOA6GMQNovM8nJdb5dWjMufevoT2Iglnu2\nmu1khWSesgx0m/EqYiamksSOojKnbdjOA0FbxSVIj22D3IJMoVVifmiM5HUH\nJbPf8OPvaenqt0hnD8aefAQdA2GciH3V8lXyIeknPyUa0bdyKiqYVNzvRISU\nDQbNNpmyiplM0UO16MlqLKvL9mvDgEK+JGQkwqZoGs8IxGGsGQ923AbObF8+\n3FXtmctGMw/CGgaK5wTYf/fHbDM/p162JM10vG/Vb4HDh+31E3g8o2gFld4O\nGjfLcyeIosDhtUSNLVDN+R4aijuxzA06maBavogI+raGR6HIK3ctvd7T17vI\nzb+085PjqjvU5sd2jn5c6l/3A9CUEXYouUQ1875w/GCV3lhblxYAoKOQsm5p\nb2hP\r\n=WrgR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLkRz6QZXZcBMM9iLBY51gPz3KBJHYQlkTpjiWeJSA4wIgMFYQzq43KLXIFBkar7h8b4ah/F1kcTuA2aO4543Ks+s="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-handleDuplicateCommands.20180815130328_1534338351689_0.16764385142562488"},"_hasShrinkwrap":false},"0.1.7-20180815130924":{"name":"@atomist/sdm-local","version":"0.1.7-20180815130924","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"1b4b882e6333c2506c68035485eb7f2da579a74e","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180815130924","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-qXpGKAfH4bKOUgf7uj44F1aRdhkwj9QvJA0iwX5OBMcyVqohWlpr88W1no/dQh9fWsy0JkC14w1FukyLbUcPpg==","shasum":"41f1fa205b2acb6c9d1bc4561b58602aad961fdc","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180815130924.tgz","fileCount":350,"unpackedSize":1022123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdCaWCRA9TVsSAnZWagAAky4QAIcsNCkEB8DwB405qeyV\njxQeE0cRNu0BqJDh9cLDswBYfjG5DIdsx0hsQb9d46MQ4EZYuXcLlTntMFUD\n4IVm4bZKfeG8maGfLS6W0xtfWV3jfhI4ZsoaNsWdzE+A8Lf7xyodT8NneOzW\nT6TUTN8DkXv6X48/TcQWTF5s1wSoy0LpVnAxRJXjkz3VyyIxsmRvzzRo6rf6\nAY/fQ98loJLrB3rx0BfghAPaqQnqql+88h9h1wKisg6uGrEzVDGwiHMycsZW\nU2+BsoeV+UU+r7fAIK4QAFh47c7RSCrOAJEbHGxe8k1wwyqW2HcW78vmoCDL\nrf5FMIagy2bfZUaJ7AGJbXdQwV+woEPvPbLpgPRY7K1FRX6GGzk4Sh5KOOvh\ngJLrw8Ugf0bZ9H8X3Zu40XcPgw4wFLsr84PPsGxZ8xcTT4xP6y8UtWHx+Gt1\n6m2sfBlgAqBNi28lW2lfoTobLFOwaa+JY2/9tKP7DawcdfeiQC5IIn8ZDPla\nxKdWFTZYbn6H25QI/+6PhEp8yxq9FU5L6wMJb5Ndi1E+o1F0KQmlLz4m+q/k\n7Kx3LFFeVGEWyVEqx9kZH+dsC9UI0ylpE9+RM2KNolwv/CA0vXGCyVKa5HTM\n7zPnRD3xDry5sOeos1XkIC3Wk2fmD4RpGS0MkaEU17MN+lEhLl1EQsLQoWqy\nKyn+\r\n=xciy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkhD4JaHw7U4ulKNaSbshEo6smVOnh8uKWq8dvsjH/zAIhAPO1sVnvSHz0sn7OCfMZffyVRR5VeCijWa15Riwtp9UA"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180815130924_1534338710021_0.41786443554739305"},"_hasShrinkwrap":false},"0.1.7-20180815132151":{"name":"@atomist/sdm-local","version":"0.1.7-20180815132151","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"a33c1e824e9568487a35217b7a07971559aed288","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180815132151","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-MhAmLdvilX0x8QFfpiMhkI6LnKsEDUO4qRtHoZLvwYeAuWVlSSiQRuFoPX2jVQ3IxOeAsWbvB9PH27ZPg2RdPg==","shasum":"1157784afe6fa7f7ddafd3971b0a9ce6e81ae567","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180815132151.tgz","fileCount":350,"unpackedSize":1022440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdCmKCRA9TVsSAnZWagAA5FgP/jqEN6VlI0+eiU+YpOy6\nIpk9x5LeQ9Tl18VCQTh6j0HcPv1iw7CW2EymQYAAZU/+0945vyhM3j3fY1hx\ngjVUo9him8Gwl7v47nM8NW8O2ZsWQaIUl1TY+SGXVBGVaRlBk8vpm/SPN6u1\nKNH4/EKWfAFzSieUe1bFKNlHAeF7j0gkym0DMecmCAL6kOTSqlFkJf7p6VCQ\nvbvk+/t56OiPsaPkTsnlBUDVT9wfqGu5aNhHITaVvIr9MH0W6m4BYSWRVmuP\n75PxuKGI6WEStuQQ5wPpnXdzqSYGBkPOCObqmeyUGfTkVEV0f87p7Qhs4xeW\nasYFz1aDriEEgVB2t821uyXK9H75pTiFKbtOP5gcHPHT+MZrjuhGG+0lZUC9\nN9PXgvIKlC+dsfNnogS2V7a8kF5C9uQAznWYIt5UmSU8GdoozY8KwGW+zomn\ngoZREaiwDkrHiLF2JUj172MvDAlqd7H4JXNDrvXp2JAfhRn8d69pMnCB00aJ\nlA6uKzjz9ht9YoxXH3u566cZLWZLomVMp48gwMHiKzozkO03zDLzJQWzRJsh\nGha3am9Hl1zGC3hRJHNqPypvucKWTCEQraGxq6U+COvFiSDcqiN2FYw/rptE\nQ1dvfbdyyOl/8P6mXks+CADXOzEHsMKs9vyih8Apts7E7K0+zPVtyPYu05sA\n3xry\r\n=u0CA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEsz5yMhtKOb1kKxX7DNwmisnMzbU1MaOv3Pfqdpypb0AiAC8I6BABh3aYhFCtjPslkOiFdqWTA0o4LxlIhcTXBA0w=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180815132151_1534339466404_0.15036651401098422"},"_hasShrinkwrap":false},"0.1.7-show-skills-2.20180816042117":{"name":"@atomist/sdm-local","version":"0.1.7-show-skills-2.20180816042117","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"cedb78e19ead4cc99de06ec0e14a1a218be96c07","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-show-skills-2.20180816042117","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-2XRERDE92mxI7OFeDoZ7c8TF0xRtngz2/+ZVXg74VwA5Nru3zQg/tTz7jJwXyrXLye7V0yPQcKsNsU5TiMCdzg==","shasum":"4759d8b243e9886f8696c7faf28abb82bcc3cdc7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-show-skills-2.20180816042117.tgz","fileCount":350,"unpackedSize":1024957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdPxYCRA9TVsSAnZWagAAeHQP/3WgT4usWElioA+su6Nv\n2u1TtJpJtTr5GVsppntDT188m9Yr1t/EPBv3ozlo7bPgZAPa/l47xfTsr0re\nCh0r8nVtpBy21c3q99IsktAkHl/z+neBb8Tv5Vz88hEQj2SkwANd74cjoYq6\n3c7U6u1f4t3pomihs5cw69XfJznOGzIMMaRz+s3VOcZudy4xZudX4p7gB8W4\nIg2mshucLojAdFvgfYBB0nX/VEkApH7AWxlOXBIMlZtck9hhwL4BGqkUgvuT\nQujttWHu36AqyjewsII7DFmvxqNkjwYJPtdaXiRhJMz8ocCnkQ/192WEMoWc\n2gVF+x8WV9QTUqj9o9lhN2iY3Ylz/RwBtry7+ka4iAU8MXmx7vX32PhdvOTL\nx7xwl/V9XlBHKKA/r0HXkPCvqrfGISxTbxZ/R40Dnk3B2ZBfnOLryAM6mday\nAfNfJiRzHWK8zIR6HowN8nFsqbps/6vInvud9d8nUMWgWOO1mzUVzuUv5xM5\nlR4vPcjIuWaYbUXa+5pVYY7oAktwEnigrWbuTETtjgKMNuQRHUF2tsKqHbkB\na8rblx5cD/iLCJt3JgYWUhQuZ8CX4lo3oNhtRH6nIRHDEmuxO2oznbjofyFP\nmYfcBjJmA17gz1tiIfSq1zaQui0P15cxRsQCnqcA3p0cVbRh2T9mqPD0dvGS\nypz9\r\n=JeXe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8c5/H+YhmR3ImWzUAQpuyv36w4TyWm5hpV/3nVEzeQAiAM0I4INtfPIk2AoXvm7Y/40SBEm16EzLO+xUqEE7457A=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-show-skills-2.20180816042117_1534393432028_0.9746964274174847"},"_hasShrinkwrap":false},"0.1.7-show-skills-2.20180816042608":{"name":"@atomist/sdm-local","version":"0.1.7-show-skills-2.20180816042608","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"3e00942c7ef72e52290f989936f597cd6bd25805","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-show-skills-2.20180816042608","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6T6LGR1/C/qdO/b2RwqYGQb4HW8AVNtBogl4h+f+lD/jGJ4gCCkptbzVg630fpelr/40V0lWO2txi7Xr3p+7dA==","shasum":"4896ec8c0957568848696b2da32088ebe682cf0f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-show-skills-2.20180816042608.tgz","fileCount":350,"unpackedSize":1024957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdP1zCRA9TVsSAnZWagAA/w0P/iJkeJJLUAsXEwKw3hfU\nVYHEHZBIovIuJ0Mu2Ti2DmfxuEOAhUWPgxwoYFHZI/1FgrjfcczXdeLflbSO\n9xGSyY2DVMTDN6d/NP73tWlfpHnOfgFUKPMYGsXChbkuLCWw+xqglL8BSpdO\n83nj2CMInGoifSbQZJbLI/iGm/P+KJDCeQjy3Cx+GaftXM8Hix2L17Mz/+NY\n1pCPo9SkOKrAd1heG96QEhDeA8zQnWGFuQhXu8Jz6XuNX5q5Ykdhz9w1jOvb\nAPprGg0Kbyz0BB4mQxnNZQ5o9saO4ewu6LaE1Bzl/gsTIe8m1Z/RXmyb8jtz\ntT54Xx2gMMf5pgYhecRGQJGbigR7sXyzhJqndr5omDws/55TVzOGjihv3+1B\nOPK65+fWsy9aUilY9flzRWLj0S2PhDOfqthbbn3aF7qzwQUqgPqikJOPEK0L\n58K/bzuhnoPPmS9wxwLD9GVYnRdRYpc2CVaCABXCJE1BngJ6PTEDc8iHPn7Y\nNC43dvC+8sEctpe3vvebFwLHaneXB3R/tWNPuD8NGiJi0sbl8a0cmrazjtPQ\nfsdjkyrxZBkHBdVP99SXCnhZC0XRkdEpryYgxj/hQD5Q6fVB8itxMVlaHnPA\nfI7zL5RlPMZj/q21Yltu5JFijqHxdeSLokykVr7XQGGcMkeez1YuqnAtPIvs\n2cyV\r\n=bPV5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIExLFzLEIgnD2dJ3pJYmjWdl9ONnsVBFRuwtuiIpzSAEAiEAyQJOqRfBRATKlGx9HmUrrHjEujunahCSj750di7rdq0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-show-skills-2.20180816042608_1534393714463_0.25062072919850964"},"_hasShrinkwrap":false},"0.1.7-20180816042809":{"name":"@atomist/sdm-local","version":"0.1.7-20180816042809","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"a4e88097c074c9eadea2312d8583d1f8d4cdf93a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180816042809","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-SSkuDgEfSTs1HEJdgfnyHUvx/OuLE2AYqpsx8XqfOnzcd1HGgkQMgN8hIi6xtYIeFAdOMfb7dBKRd/4yArgV8w==","shasum":"c420269586cef4c88bcc97c3dc62fbf3f327f65a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180816042809.tgz","fileCount":350,"unpackedSize":1024943,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdP35CRA9TVsSAnZWagAAbvIP/j3Y35NBbxf0Yvjxgmzz\njHY+iZLolGbXxjky9tP33v1GR198N/tGzeCSEHL6AlXKetUOyRxfFyeVnH6d\nJT+d1BKgF+UPPQuN7X65adaqzyOsGmgUOWNcc03YhUZWRf+c/FYyt+LGTL9T\nn33gSZukjnz5EipA6RLmhUpl45vYWlgnHuE9hRgXaOuddNHhe9enBFNY/rDQ\n66fRe0NP3kShw3RYOYrWc5vza5Kzb8b1d7CDyLG59mrxWEHLjl3lScDmr2ek\n9WZhEVrZI/ALH4ELcbWOFczBZ1aOHpbW1iNLqjD9LZTFXdn+0VbB8PUSBYhY\nh98dKF8zxJc7B0Hu/APMjurUsUhpd6y1QPi1AkkSw3pP0R2BSvxbURtRYHtX\n3k40ry/7QL36STmCyI5enSJcklXd4w5efqFJqb5T43DmsPe06rGVY2QkZtdo\nTd7oyykIC6u1W77QzPvhi/6UtMTgVHJQcRs6xuMja85qyE/xNx958qtUvmDG\nvjVb4C+HtqdGdtXjXLzrE1wriPLr82f0TsH+0MYKau2hUXdCRsTWGFppwLwS\ncrbmIxJfHRgLwQV980WcoZbXjiaMvavE4UmkbU37Y5A8OsdaU0uxlAYEFvlr\nCmHgyWSrcNZZ29ifMhRTS/2HEnv2sfcnaNhAhmyOKxfg03oPA0gHuQQIxQ9J\nNuxA\r\n=65JR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1a+j9ZE19mW+GyCnx/DisjBCTsDqmzs92n/5sSoAd+AiA+dq0XhyalZw5YTQP05ZXGS8PxLkcG57oFKY/SLKkTEg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180816042809_1534393848789_0.7943310970110087"},"_hasShrinkwrap":false},"0.1.7-20180816205030":{"name":"@atomist/sdm-local","version":"0.1.7-20180816205030","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"16e866e87734e99595b280992fc799c08a74a008","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180816205030","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-h+D8E9YteEJDG9aO9MozP9AdDvJX4FlGL4WWf/x4vpfQhHIu+InsvFBeC8ly25QMxK7JJpio40XtOj8GLqKPXw==","shasum":"eb5d5be7ccfb8066fb892acef9ccc1fba8337228","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180816205030.tgz","fileCount":350,"unpackedSize":1025140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdeQfCRA9TVsSAnZWagAAV3YQAKTv86nWvC668Mo26uA5\neogx9IsbYnQpeQXdF+0J/2ePHMBZxh/lRojd8NM96jow5dNenUrlGeKi5IKU\ns5Jtot50TLnp1Y8vM8hHcplGAIH/FzQIyyDvlZdJ0JfXietww4bryqiZ5Lpe\nGeEyZRW2+LZ3nz477hTP68umIVJZG0XtPA9OKio4+hnYjKu1vPyRQLV+fYyi\nPcs/r4hAx2V/Yc5f2d72BjT8YAC8h2vuFYIryeIkEcr1b+EalXvkeCUlFm1s\nC3DIzwAKjlO8R+cVmrD9Os8ahpXRotAxxQ7n49xkDdCNC5wlgJJaNZ2JRJuf\nh3XDlAhvU0oUyIpGEm3hH9BWtimTeAC8dZFHpUEKAACNXr7knDeyvUo8wdjE\n8auifR4gupUIsG1Gse8IEMEOswJ77kVIKVtIEkULg7QDJTtBwUvIPv/0FL4t\nMqsM3EuOW5t4DtzsdLUjlYS4a8hmKm0lV1QqZDA1iwqsSvD3eF4FT+w6f9w8\njq2ew3ZgJfLnsvoqmrLigkD0fChW4ptgRvpCe/aFC/Pq0XraVD3l7HLBSPXa\nivg/y53bMzNgunEQqWYXTpCV0hIj88tX977IDAejGe3/Ui8xkDuTLgzDN787\nfAz7Ta5J88fwPXhvXbF8drznCS51kzIrN6FVnN6CZ55Zd6MVKx1EshSXYb2v\nt/Gy\r\n=ppEz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA2/T+L8qUNgdOSTGt3Kw8sMvL0fyorEw84WVeTbWSTpAiB8w1rHSUI/oS5z0PLD6GE2SI3O38PI51jOw5ca17HsJw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180816205030_1534452766923_0.16463967698179016"},"_hasShrinkwrap":false},"0.1.7-20180816210300":{"name":"@atomist/sdm-local","version":"0.1.7-20180816210300","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"0531190eb645cd51044a35e004cf031a82b12dbe","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180816210300","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+bBQk8m2Ogb0yLux9xftOdLIjaCtMwydaAOEZ3xOGq3qDyLnW9qBUHdH3hcxluwAJ+wm3DAjiStJ+yH0ixyrcQ==","shasum":"f83cd939c78a56243b7f6c10fdd38e616b8ac176","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180816210300.tgz","fileCount":350,"unpackedSize":1025388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdecNCRA9TVsSAnZWagAArMcP/37IahZ0KWEdt2NvRedw\nzDpTREBl4C7GIECHAXFdrHHwF5nHXNOr0AlYy/inGDXzkDNAMeYOMqcdPTdb\nYvwaatB3Z+y0KCny9/sxi/Dr5umJDuYe7SEuDvdkLGyVQdRR0fZHvnE591lW\nLDv4HeG7PhAqyR2ruvhOA1ZU/9bt60wb/JmGXUtfeaj40VC2PhTgJFzDBt6f\nDjHESyCMobR8J4BBzbwxvL1cZj5w0wNSAsdlHHcFrBhL0JlT7gRjPS5sSRaj\nBaloutIfSJ4Jf/Nov80JmfG0H9XOXRxgSq+RRDGaO1ev733QYP95IHtYhclA\nfm2APRYqcXp3r38O9dV4umtyP0+qAGUwQJqUYh0HuiAOiALq3FKtECtqUazB\nb7rxwgw7I+u8Js7CmE0+lVxKB5KjhRR+deWZYmKdkKqKxlt6MJMDXu9RuT/1\nylybZINxQoUkFfpvk5s8AvFE5XnSBb77EgRyKEQfOz4THbbrde4q9sUf6x2D\nTjCyg5NHM7EnfyvizFov4+e2vqFOl9gomLod1mhyudAs0T/gdgwildytsCyP\n4zkyetL4Hjn7h6RczFODuHc5mU9vyFuDXE51fuTi9U/+/avLsBYRt5NafmDT\nSZOGsirCMHMRdNSuIlM19zIHVQCujSjrezX4K0db4oEt+yhkxgWCM8x5CISf\n+jvZ\r\n=HtNI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiqln704Ur1XvVwmC0IAsg2c7a8kn2ylpuN8wT1WcnLwIhALVIkTwCQA6FaZofIlpfK+HcfTLcVkfNTcJpp3JR66Rf"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180816210300_1534453516453_0.3769021761644755"},"_hasShrinkwrap":false},"0.1.7-lieven.fix-regex-path-windows.20180817080745":{"name":"@atomist/sdm-local","version":"0.1.7-lieven.fix-regex-path-windows.20180817080745","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"index.js","typings":"index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/body-parser":"^1.17.0","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/marked":"^0.4.0","@types/node-notifier":"0.0.28","@types/sprintf-js":"^1.1.0","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","find-process":"^1.1.1","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.1","@atomist/sdm-core":"^0.4.1","@types/lodash":"^4.14.116","@types/mocha":"^2.2.48","@types/node":"^8.10.17","@types/power-assert":"^1.4.29","@types/yargs":"^11.1.1","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js,d.ts}\" \"*.{js,d.ts}\"    ","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"9c833a039d0f995084a0a8a750bac0f14994856a","readme":"# sdm-local: Local Software Delivery Machine\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist new sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local lifecycle listener. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist listen\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\n@atomist new sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n4) *TEMPORARY for Atomists*: currently sdm-local isn't published on npm, so you have to:\n-   clone this repository. In its directory:\n-   `npm install`\n-   `npm run build`\n-   `npm link`\n-   Then over in your SDM repo, run `npm link @atomist/sdm-local`. Any time you `npm install` again, you'll have to re-link sdm-local. Also, IntelliJ won't like you because it isn't in the package.json, so it won't recognize references to it. This won't be an issue once this project is public.\n\n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `@atomist <command>` in another terminal. Try `@atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\n@atomist listen\n\n```\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\n@atomist add-git-hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `@atomist add-git-hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$SDM_PROJECTS_BASE` and running `@atomist add-git-hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `@atomist add-git-hooks` and the linked project will be treated as a normal project.\n\n### Import Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `import` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically\n install the git hook:\n\n```\n@atomist import --owner=johnsonr --repo=initializr\n\n```\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\nOnly public repos are supported.\n\n## Running Commands\n```\n@atomist show skills\n```\n\nType in intents as follows:\n\n```\n@atomist create spring\n```\n\nNo parameters beyond the command name are required. However, command-specific parameters may be provided in options syntax.\n\n## Architecture\n\nThis project consists of three parts:\n\n- An Atomist SDM running in its own process, in a special local mode\n- A command line.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-lieven.fix-regex-path-windows.20180817080745","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8zm1NAPv3aMrCQ9X/xVr9q1UexAIcToKm6W3bzgS3/4awfNjJQAo9WwXxU4rC4p4XeJ/R24JDiwrw0/RZxvV1w==","shasum":"b3d4623a8f5899bfea34fe9a647bcd24a67c2369","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-lieven.fix-regex-path-windows.20180817080745.tgz","fileCount":316,"unpackedSize":951954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdoLcCRA9TVsSAnZWagAA2awP/1UAekJmeb7ukztEQAhu\nWEDOMoelnXKRI1AA08tU3lGZKv3CCq/mLYBZf3ZpHSmcbsx6iMcqlxzifP+t\njcQWrzeKGWyfWXjQQpkjbK8KdrfAuHWsKWiYZ3knQm7z8b3otxF5Ajh4GfU0\n6X8xZyDOGcFhQftcydBpojdcM/XWqGD1sTyod24krIG2ICrAnOLgBGk6uyhQ\nz38aZXLQ0zNMdijKUH7MDLSjK0jPWVyfaXR+zFShRzT+vfx5ujyaRjTr6/c+\ntOH2qY/0SE2wuCoDZFN6JYK4suE6r5OLxiuRQhSu5rdGbKRhrRXIWbgLsxM4\nZ43UJTQxShwt4SpDAlcegWQPJxBg4Y/BWtP5Daeon3lZq7GI6rSmEdsw2qJm\nA5szXTibXoNGj7kRavc0VJkajnjQ3xiGJx/wHyDLN0Sb0uGAktwiPaAzLvH+\n4FEiv8F5KgqQfOpt4Z7OZLdhlXVrCRveyijZPvSlUU2mCh6UrIgm5f0yeEO1\nyQi0QrLqMMhIAsbd6Ry8R2KUFyRWL9nRsrL+rtBkZVqxjLWXluL/uOLtmt87\nef9PuQuxRgf5h3Ts+XU5s80B4ciQE8SViXgMXDCZaabwcRe3tUkr7LVoT/dd\n0Q7VQ05Ylqz+nTxqEapK4aBvhMovjzS7Hen3+5w3hKoaXQYtLCKceTVk8Zvv\nJkUb\r\n=w4Wx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZp2eytxKuOAXa2Z8+6oEGuZF3+JAT/QvtfLyATbZo8AiEAxZjz0R6hjz3q9RB/pBneo4nAD4JVIg2daBJDotcOAtE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-lieven.fix-regex-path-windows.20180817080745_1534493404013_0.1235332324414935"},"_hasShrinkwrap":false},"0.1.7-20180817105426":{"name":"@atomist/sdm-local","version":"0.1.7-20180817105426","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"23fd7bf289e590646f92c8c73aaedc718e6f2ffe","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180817105426","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-B1n+vWeXyXQ7dxsua6/sx99t/wGgcopa4LWrNx9vb+OOeyH6xLi8QZWB0UO9KT+k4CXOSfmXhh8xMk3fHtGN8Q==","shasum":"43472216bd08375c66b5efd5305a9a289447a963","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180817105426.tgz","fileCount":350,"unpackedSize":1026546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdqn2CRA9TVsSAnZWagAA6gwQAJoEiiYfgSuAf8KwZgAy\nUnT4u2wkNbKUtfvU/Nso3ZOXcXtaK6lTL0CKFvCGHWegyP+l7bxblhEcHWHS\n9Z2GBv9VjetZs1UxQ6suJZhAlesuP5qGCxQSAwMcRUG1UKHT+9HWvkjJTJAL\ngQCZBNILEXdO5+J6vWdxlRf5psm+vYuj5IKfH0VqKkOWwXUy3cDbWqqAdiVV\nwlMSF8ISKihDokv/lRkYKtBCK8h/GWzTSizNNavZc1ddEBufR8NgriPGRHiC\nJ5CujXblwJL9ViJQgGQzBv3rhbwxpezxssDBI7KQXXCG1rv9B2s2+5v48vLL\nwGeRgmWUF88rw+lxMtSrN4dXN4qFm8Sv1ci6jN5KOOp5W9kbs9tnUafOdKjn\nmj12XvVm3n4xpisWzhW1AjfB/6y812b9EHH1G28YJALtQdBNDIsxtahd0tJM\n04DnSq00hrtlDzuj2JWJJboLqcGr+076R2ockQYhb0EVlfk3eACagwbhSP/Z\n2vm5qIxLucmz0aS544U44rtE7xxx3iWunRHFzaEwOy0rCHr7KCVosw3Qe8sm\nlZuIM+W8+bRUqdB+RLMS9ZpI8n5nGWlCfwI5IAF5ArtKu6DZE4bVDvrKdzBx\nd0RpQIjmnJ+illYoVEWgrBtj89KhawzPPox2Nzko2xGip4nEaVUuLiL5rgoJ\noL1m\r\n=SaXf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+HHyZ2Mmhy8KJ38vVcc+EPQDlL9umPdNaobZMIh1xygIgCpiy21hH/ymd/AkudJLcYgIRy5angiTOnB3re1Dwuwc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180817105426_1534503413801_0.5538887962825856"},"_hasShrinkwrap":false},"0.1.7-20180817135252":{"name":"@atomist/sdm-local","version":"0.1.7-20180817135252","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"91e383a7d85d28299d1edc84a41a74e0f0478efe","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180817135252","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-PD3NpId1iAutUDlVCbhszUbRVb9SBpEiThqCtpUpMVu5QWdo4xx1PTRuDhbqA2MMsAe22snVr+kJZqZaZHi9ng==","shasum":"0fa22ab453c388c2b0927828c3a986094accc7a4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180817135252.tgz","fileCount":350,"unpackedSize":1026669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdtPNCRA9TVsSAnZWagAASpAP/jTUXnjEXsdObXr+WoQd\nJ6usFzeEgoRBfXEIyyEJa9oBDb84PuM6igpjLJ4ZgAt7qTCRFcCsPZp1O5Ln\n7YIc+A1r6mG8lf7114LszyPkJrHsBEpwpUI8dUgJe0PTf440J9arHsKcsEtf\nOZqnXGOMRRT8j4PaTXsGwz1o/DtaKiMq5XreDyVmJwB3jIIRRBoTITOoT/kh\nVupY/2b0fHmxTVlfoNoxfH/dnHWpi7QLwnsyTeTOpsl7OPGg3WNZVnaZ2OO/\nJAdUt4S318li0NX2/DZRbyqihDBhw4dVFgEcbCCFilJsq46sd1fLS+tknWJN\nSdrAmDAm7zCvFEp4YQ5ds+L8R9biF9XV4eUQwkN/9+6sGOIm+R9C9om7Y9fV\n1cpCRa89Fh5YjLknEmvEsHnp6M+YGCiZacR7b7bCsIIbeHuxX5xF9376S9Rd\nRoMJpaOwA82OEuvrHZOBZlpxeeRj2oRMfXKYolQ9Cd6vfh9eJzhevLsKlHte\ngABybE+4+4tKlkrZ5msxaNhmvpwtFkfPeglyC6o/U7UTvKdyEblRJTAJ+F0Z\nBxBQIPpBc9Uvy/70P3FpvWCmCV+6AAITV1EdLvttxWqBDx6qPjvTz6y1TnDZ\nf9/uLHqOVYb+VWG7XFHKU66s5/8CHZp+5MAIMjOfalTEWSqq/p5ME9D7akFM\nZbGM\r\n=leKh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA8q1jNnrSQyoQ58ZlQHZmy2v+NBCaT5k8Et6CjDmVfKAiEArW9QAbzI72IwipJHo2HrkPPeWIoYYKkPPkgGAQT+iio="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180817135252_1534514124845_0.6908855795208115"},"_hasShrinkwrap":false},"0.1.7-20180817214641":{"name":"@atomist/sdm-local","version":"0.1.7-20180817214641","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"03af5500147dfd7b5e796a36f3c713e757d914e3","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180817214641","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-iWY060HzpGJhQox6+zkcWBUsuTYs9OcopW2riGjhmpVaVXg1hFMkq9tRnpszSnkrW7j+EsIXvWo4/HpiV5/fWw==","shasum":"611ac803198326cdd5ed54cd9a2417aeede2be7a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180817214641.tgz","fileCount":350,"unpackedSize":1026619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbd0LRCRA9TVsSAnZWagAAMsgP/2oGorRvNTlJ+kJWEDWF\n4uWkB+Ml5k46wQHjOK2aNWtfUXt5P3jNVf6NOwRr+gSowZv7u6wWR8ca4ZOk\nyR8BjCSmrRCSqBr7ayEnicFE0hotniOuKo2WN1H9I3K0cLR251ApHncgvebT\n3PEA3RhT7v70g1uobNrXO6Xo+kkRClI+QfIob9Aszl7kUYPoLkyRafXxH/49\ne+kmSIRTYbab6+WErd4NHAm4n9lawSQpIEpX8M0qydrayRh5nabEa6wN5qzz\nWDuh+6JFXwpUZGMelgdTlg71uo8r2Jj0JpaW+j/Zzb1x3psySPtCCKlgxQMF\nGNDuT8CQmgvikKX8Y502ryB0Xhy522j5SL4T2urci7IFV7ny9vcNGfzpQOqp\n5djrQm7VGBKccEqMuPsX1XismaBSwUi6NV3GgMojwoHC5FYNHvAq4xfGt4iq\nkO5BEoMjH+xg1z5h0y71eFF4ZmhqNQybNvo4bzoxtpRs6qgcdsPUkCn/gT9f\n+Q1Z3pz3+intWqlsSGvP6qAxOXycF9TKg1YJft+F8SP3RjT4Yz1t1Fz2Iw97\ndcv5zF/PV+t5ei3Y79xcksqAPZ+1/SN+y2OSLYRtb0eU5ktp1N2kO1wFzVEU\nlNtC3N+4kVdaFB+RJALGjSoEZqnyfUwp8/TAp7/2r5EbkvOn9Kqs7xH7+cqK\nQbFN\r\n=4mGh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgESYT+iMeCUpgC9+GIF8ZYsb+wAvgpBefFZGd6LLt2AiEA642f/92kBGLxddx9C6CUheXR3cy/NMzgd9WZo11VSk8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180817214641_1534542545136_0.6387281239198745"},"_hasShrinkwrap":false},"0.1.7-20180817214716":{"name":"@atomist/sdm-local","version":"0.1.7-20180817214716","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.19.7","@atomist/sdm":"^0.4.2-forward.20180812180244","@atomist/sdm-core":"^0.4.1","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"386e5d80c5a7482d7f0c77d84c293628091fe7d6","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180817214716","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6d1REeyB5VgIntW5hT8psk6MQnby19OrAcpA634T20Y0AUuerZrPP48y7tXECaUNyJrFe64pKMCNc9amJF5+cQ==","shasum":"f16b0aa4dbc0a05da51fc7e4d267edb5f1f131fc","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180817214716.tgz","fileCount":350,"unpackedSize":1026637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbd0MJCRA9TVsSAnZWagAAigwP/jsqgZyqNAp5OuP/5Lvv\nIevCR0U7HFaB4q7397QeNeETwzaX2ltjvby73dZ6Ncy58IoK5WVmPR21t1m/\nna70QwY8ovKmdGB1wcc2kDs/T8x7A50jKyT6k9Hpppo8vszIQ0Bsz8Bb9I6y\nVWQhAi3PmgjtxtXb6TQCfYyTplXcABvz1tGV+IwXLXpPy+VtO0PiKqGn3FLR\nixJ3VGvB6wNnl6rfkw9bq5SNuZhW4PHOPyRZLYdxOB6JnbeGD3T1BmJ7CnZT\namIJ2Pq/ruF4/yEMs1FrS74qnJE4B4aadz4uYz59EstSmr9vRnHaM5B0rxCo\njcus4bVMlO7TlzctPOOmoJnG21mXTIUxv0p5MKLdlq3RNmWcbZx+nqqeTn43\npCgi9EBDMYnBME83mkFRfAOpwlPpJpcHe1TCWcKdxHjCNZxC7YR9xL7Hp7J3\nJWyXb9We+pc2QG2rbIGI4ikqoR8slQXLPIns022kMN1aytFVVkVygGmpvQZa\naKyEL6fzSRZ42XZaWEV0sAKmJr6s+NzUyQUTGe2Z5KyvV5V2AYXAsLsgX8uh\ny+7j7DUN5+AWSnX+A7zVtpGqT361XkS3lzRiCSIqpD59n+sGrPn4vdeGioY3\nkI/TLDoCYC7pvbpHVEpY4lm++7qln1LO2OJBM8mYnn1ZmYs59tGuPue+bEFQ\ndIrY\r\n=6hCN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKUBlDzWP0HXdhM/0G5R65hxoopTPs5N+EtdTmrg/GrAIgCqhvtve/Ozvl6CJQE+4fMrNjKhsnq7xCfkjCOXdMGcU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180817214716_1534542601417_0.5952848587594965"},"_hasShrinkwrap":false},"0.1.7-20180817221330":{"name":"@atomist/sdm-local","version":"0.1.7-20180817221330","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"132085a08dae7b794117f8bcf48254f253137e7b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180817221330","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-sIA/ONvZkVSLomEGw80c7gdMqArwx2kogliqOCi6d2N4FWNxWrSN8HKpzPVlZB8O9rMPLW+XHUSf/V/dgwALjw==","shasum":"ffd5e6a9a03566990c71be3cc53d8d3fa1ef7eff","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180817221330.tgz","fileCount":350,"unpackedSize":1026614,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbd0kdCRA9TVsSAnZWagAAw+gQAJcaFvR+K8dYqt42VGhM\nTfK93a1K3Fh/B5+lHzzS7P7mtBMxlcYXg7hQYSLe5+F5oDhZxNWXhPIMHZbx\nwdoBP1LhQVavpK0xIICtxikauq+G/QEQM9pwaGl/EGVOEuPwVJhxyzsvpeVR\n0nXLWktBt3IhlVNDcG8Nu/kNHw3kwizrEtTTyRcVzdwA8iarMjm47x+2Jmp4\nyqFfNlpIcGmK+pnNEJSgMR7ZlY8t4Kdyx6qtO9GVNhCT7WUH+0+OmJNVvfBx\n/U9dZ9p/wAy/aWb1itehff2YgizFuYOeH3YnM56BTK4dcsTgVR0W2gnSIO60\nYEQuHpQTUg8vE/swqjFXe8NWdmXgZBi8WR8Hxrpcy9q7HyQWlJba3lGsorLP\nKiqS7sn0mS+nUbwaW+25J7/+hTu2JTlZMNWDxHAKrMKGlfdsfnatE9sTjBCN\n5WieNJ7pCLJ1mdSqSlLZQXKdhmE2ULO3EofN4bMGe1wkJsSs4t7/IiApgpt7\nNILnPzejwrpOnIlP4Fg6kIxD6h8b9NzR6oQmKrbsGy0/b8QSmoVkvLoRUEfB\nm5FiZ59wzeuOsoHegvZPCLFaPTQqYEqGRQ/tc3Hq5nXXYuWo5eQajPLLqHmg\njO6upbQXSlGkSDTq75yOzViWJPXhVuhki2mqkSmI3R5mc7goQn78Eqxe3rRb\n6cSU\r\n=Yzn5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGsHk+LJslWro0I+TZYkCfgcSRAvbfDFGtIL34OB6V8xAiB4O3Mzg302KaRCaNDjLth3DSwY/Be8bRBgeNkvXfx2yQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180817221330_1534544156335_0.24157994483432166"},"_hasShrinkwrap":false},"0.1.7-20180818055647":{"name":"@atomist/sdm-local","version":"0.1.7-20180818055647","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"33e24a761a7feb78d046652b824a4a72b90b6209","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180818055647","_npmVersion":"6.3.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-L6O4oR5JsU7ykwo7YgVsgPB95UExBhfqryFtR/Auh4pNqw2ww7TX3vK6sXn3nEYyEe9zqsUmkaTt+reCSj/oxw==","shasum":"e018fc46cbd5293ec490010f191377123f5e5a32","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180818055647.tgz","fileCount":350,"unpackedSize":1027827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbd7WkCRA9TVsSAnZWagAAK00QAIv723ADqDJv672LeP8v\n7S+7188O1ornxB6Ke+OkQH3FnEjh0NkeoP00UqMDx3GahekgU1TZdQhDV/4e\nHXtIQtLdOqTjCv8NtNxcJZesLJATOhWHi6yRq0gj7qWF4SNqwiqeWLUsqqVr\nnrJL9oZknLPkF4H6WRCSxxPKl0IegC2P76wzrWJUA3wtlcXuhcPEZ2VGiiCA\n5H2fGhME+X9hEqvZz0UnMmBbD/RLc8bAIJh3P3y0nZMqFXYLPnaIaumcNAg8\nP0Yjh+8tbW8e2jV7B2gXHMffBTHuHIvsOrlbhE+/5wLGvPYwpzRsG28+kVKX\nvh+Ob507QDgSzOYmjN5ki6koPQvxwP0ZyOgKNgYpBH7PwFfA9kyjvJzRfUNm\nd3n8lMnTnttUna/nnXjPMLEHTe5LArw7ppAY4fF6Bwe1s0Zq7Pr4yB/prpz3\ngQ8s955tb7L0YVyKVLOiAu9h9P7k3ou4QpSXSnYIgqJNqXlaXStuLb7g97sF\nSCYUD/K1rHBU3Qw5zzWI/mKgrB3Zxfbai7OsIZ2hgixncsRn2uO9tIRpKsF1\nE3PLpJcrGwYUy/9U0unMourK0OYFAYs+/o/uBX0IDmpLlx/3mvvdD7Cfvxdz\nZ4ADjRcdjY6V9/OUAvwav0jFEPXStzjY1R6ivZgU5UvJ0xdJe8q7Iegg8KV/\nZRZT\r\n=ItsN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrQd0cMnNZ9P9asnoI29AGWOb/dCOf7/TWvtWLPKNbMwIgGRxvR5P1AFvpUvLElt9IUzAMErCUbfh2kGlzhiNgTso="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180818055647_1534571939323_0.3287264068520592"},"_hasShrinkwrap":false},"0.1.7-20180818211349":{"name":"@atomist/sdm-local","version":"0.1.7-20180818211349","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"87247f61f8340735a229d152aadb8bf01cdb1979","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180818211349","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-SQaZYI8+DfOtFWM7zECT3giuUdKHWTNg0OjW76qw2Dth0S6oxDtYahlsBg3lScf5HlTgCfynI3cGtFiSLgGNWQ==","shasum":"d9fe2a08760c063f1f4e8374888a2ac216bcd1f9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180818211349.tgz","fileCount":350,"unpackedSize":1027762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeIxtCRA9TVsSAnZWagAA2DMP/0/M4NtTOUHL+ecKPVV+\nMEF0/D4CHLPtmYAeUNc2BggZCerZ8onVJNsPNBaJLciejefDs6znJC03YU6d\nSqFfd6iw3HNdXVYI2ek2zx9JATNECKWLamdQDnz38gqqyijCI/Qyz4e1eQQc\n6XHZJ3rZF6BwOsel+n2FrWiPlmlz1crqTw3SVv+0CWCKA/tCvMABvJUK8pOM\nVy4M/foBf23NE2fKWoJxqUSdt926PfvP7+mK3iWVe5mk5hBAlhBnjrZV3k2v\niTQBmOmXRT6dystSFE5KHOkv8RnGEurGNVpO901/dUnTNFtxomAg3Oh6vOXl\nR8vAAK17vIvKmgmBC7wSHYRK0V7NBEQPO2/IBXr2jIBVSzvPvI9VY/b/GYyk\nAregZgybUPYr1e4viBcs8567AoZ3cens8uwX221a7QR2ZSRfttsVzanNpGcI\nWNPeu6Y1TI9Rj0S1y2UVq6NRlYV4gbp6svqgEhJPNkssIhIsrdc7atEyGq9J\nLAziTiYBOFnr1URGNvGoUNxwMpKZ/T27nb4E7bA0slyRS/D967CbpT3GrQAR\nvz34EQvkNWC5qMIgEf9Gyoqx8kCyNIQ5ubmdSawU/yA/3Lcdri3T5updTKXi\nu+UiJZftww0vZZZ1i1Y4Pk9D5u1fQICQ268KZXAKqaNoEJ9mfWIyTkCNvb6A\nEGCf\r\n=IJY7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHrkJ0UrZJJm/RNyU/yJ4tXawKsMO2DOcoYJFBrj1mTdAiEA/wZ3+5KdsJpZx14XudYZUdaWUXbIudk88ElJ6bN/Rpo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180818211349_1534626924398_0.9247357452519533"},"_hasShrinkwrap":false},"0.1.7-command-form.20180818223105":{"name":"@atomist/sdm-local","version":"0.1.7-command-form.20180818223105","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"0a3eecb35255d567f8f08171e8a2ff99d6f591c8","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-command-form.20180818223105","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dgdKQ1oYZE45k1TfU5SlBPt2FBHHbOhNpIpKCOYqaZs0rmvFPvOcVYoGH8M1dTyJEoe683L46qOHvdZktUYf5A==","shasum":"eee50404e75bb4e8685ec7536bb4dd6557a1fb9a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-command-form.20180818223105.tgz","fileCount":353,"unpackedSize":1031811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeJ6ICRA9TVsSAnZWagAAMD0QAIycQfS6We+omgtVIL82\nS2wl/NdCHwu6bupwvwxksoEHnRaq72JC2BrrWS80mtsRbjKFxwF6ZCxs3Rfl\nlMhmR4aYwrJmaL6aO7wt1nkdQK1rZp9mljrjnsrThWE/prioKa8t9c8clhVR\n0FBeQ0OUKODn1D/PDQPL1M7YKlw+CSoMWK3nS/bHwEp2apAt8PLdfrBaTGMf\nz+I556p+lIokiZ6gDVaLUDWDbgHpzfUsW3ZHqxfvKArUg0yrt4zsLtV/0Gsz\n6HPrgHQz2Yah5y1LiZ7tLtJKA44/pPNcmQLYPCmbMiMz4NMJS4uh2t4aKsM0\nfUfW0SulTIuEjkuWhKVHNw+psoBkJaVM8LwXFqofdYbDlc1P8I0Qhze5sx90\nj8KtpzggfmT2RuQsqaCfIrby+E/VHc9PaoWcfD1OGA73A88/lrd1XvLH4gPd\ngTki9WCCvSyBEqrBiaohiJ/rzPLkT+bTzSohTwIUGHB09retrZZkcIgBjjl7\njnmvQtlWFIn8FIYJpbdits0et6WjCatPb1YPHVTmWc5VKr0r8OmlgF27o5wh\nNEpSXZMQJVAyT+YGi8pQAewnKLhNiiyKxaa4BUmdqfYP9WH4W4uANHuh+pLh\nWVWtIx8BP3sBj5V9HJKBu5phyRiRlkhOM2xNOeEegd5280J6KlmApPPlZ3lv\npzmq\r\n=bGYP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK3JS91gMrvB0EIO4AjPdWtNWyseeQUf3O7g00sDEMPAIhAON/r11p2AqJY+TZ6Hb0lAzVC0Y/ZdAu42FBF3kJAZAH"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-command-form.20180818223105_1534631560330_0.35165312949884675"},"_hasShrinkwrap":false},"0.1.7-20180819003010":{"name":"@atomist/sdm-local","version":"0.1.7-20180819003010","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"e3e7f4dfe2738b54744fb8633f300e241cd5782d","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.7-20180819003010","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-OyPu2dpnDSvOyNc8lyy+CYvyMm8iSjS9G6Sfm0xQt0XtCOEj9lia1FPGzQK6NrSeyquwnadq2xoVUJofqE9Lfg==","shasum":"58f8a91e659890a3138b8939e62bb6e5f30dfded","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7-20180819003010.tgz","fileCount":353,"unpackedSize":1031798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeLqPCRA9TVsSAnZWagAAHtYP/0b9dwAAVZuM4HWGvi8r\neXocaNR0OFLi59mCgd9XyDRxmxi2PMGMYPngqLPYy7tYnBnJ9NdvHnjgghNS\nkZukQmL7OCZYxd+lEA5IUeWYbweJMWvvZ8MujKny2lfSclip9TtPrqiXErXF\nfTi3TGqFhU20bMlMehyx7fX2bQLg0hMs+1XNh73z2kprAjLzFHh74B1xnRkb\nlsSy3GhopriE92nOKGr04ZZ4CkxU9pLSIdIuMGEZcg++zS7Ykjcz9LF+1ekO\nEUwKx2t1PVWtC/H0JGnFpayF59Q9CArxNjDeaoLK8LMol8bgkSy22i6a0vqR\nf8Z8zYxHkovyx0Bw6wGbw92a/j7AVz2mmQI4h+TQFRHCq3QG9Drq8zO4Ap2A\n8qkvVpr1sWy5NHf+Yr1lqIl3mEgQMz5iIViWZ3zL9VHspLSo85Lii/XaSMo4\n3oJGGgCw397Bz7FSGEOAYE8q/o0tDCF23jZ8C+XqjyKGmzZpKYPG92oIvcUV\ngU6G8O7zbNyWVreq1Zj4jR9WPgT+Yls+VemRxSKsKiwB0/i1Al9kFzaJ880z\n2vHZsKMhzwGiiJ24R88uWlCqYDncqf0P4OvYc4UN45Ih/aivzDBizxrPBF37\nKAPvZ0aFw4qzTGHgWXh3bTrP3IyyD7lC5bXkFbovE8+TNH2zxvEQydIYoQKs\nXt7W\r\n=mvkv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOS7CMJyrWIO59OwdglS/6z8LomYZxa1wUMmwhhfnaLQIgD28KcSv/oNRK8j/W+vaQDdr+5Z2BeGN4TNmv09LOnF4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7-20180819003010_1534638734533_0.4901166777079433"},"_hasShrinkwrap":false},"0.1.7":{"name":"@atomist/sdm-local","version":"0.1.7","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"e3e7f4dfe2738b54744fb8633f300e241cd5782d","_id":"@atomist/sdm-local@0.1.7","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-UbIbliJBMxgpFDQUr01bHD+v49Yc3Of0bNGeP84aMfBFMQz7PYHsiLgVp1Pi/wqz+IhH/5WSdmhTA/DLSaow+w==","shasum":"00b8ede9ba3ff780ad97d55d6a475fcdce119a13","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.7.tgz","fileCount":353,"unpackedSize":1031783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeNdiCRA9TVsSAnZWagAAlxUP/1D3Ha/Rj41571o3k4ee\nJ2gOGRYYtXgiyxpsynAH6a1re0bV4M04Kl382R7A/6OwSI8CSu07IwmNMwz2\nmY7WyQmRT52gVI4JAk08euHzJfV5vhk6XPhE6xo+Qb9jHHVeuHK/tjLFctxD\n3kWXuC/4JtYNUoTRyk6IGX0mQj/NqT1StT/eZ2LiZo2xtYsQs9PoozuiIBnk\nNAxUK4tMdLBHUhQbya+clvO7EXDbLQqe38a0ymPp41mfHLYq7FTvSbJSkyXk\n75c+uDNfnKb7r97yVSefW2CDNtnX56QkoHEYdNF/FsapzQcrATkVI8Enigg7\njKDAYm6ntkVQm0PuieOqkP/FOEeyvADT4zGcW3adT3Laxm5mUwEe1QwERBBt\nBMURO0gxGGlqGZIyRvKxJGumoZuMWb3STbmT2aQv8Bbjf2JYoc4UkU6il7SQ\nHit1FRBZB7t5dyi0TzekjcEw+zQ44pxNjABg6tMJnmdReF5FafxmPQ+0t1Gn\n5na54/I0PAqCGpI2qJ7qZTJtkHwtPYtOdLHF3Ov5AZbXUzxSgUkHI9868UCf\nc6H4+hWyHL87iVLov04Gx/8DTzr/FuX8R7UXLgUdjJ2tMSk1dUj4d98FrBUj\nDtisbeEk5a2ncm32y+Oozx69OIfr3pxcUFawjCQkhqDIoqYFMd9WExbM7lV5\n1ARk\r\n=/IiL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGyfKSqYz6GwEb6YgCtSnA6wHvObn1Ox4KhglMqOYV5hAiB25SWQ0/vhZx0BmEnWYsQXewTSqzrGbQEQQdJrbzwoKA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.7_1534646113275_0.6440992072661322"},"_hasShrinkwrap":false},"0.1.8-20180819023613":{"name":"@atomist/sdm-local","version":"0.1.8-20180819023613","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"1a3246b91bdc9c10782d74d60e2fd0cac6a8e711","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.8-20180819023613","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-rx00K/z8j4J4M6jcMx7fdoJ9KgR/0+vKfUIiTcKMrQp/LeWdsyD3mKmjKHKEj7GAQ9PIT3A/xUNTltRqT1ALBg==","shasum":"be6bba7470bda29c6cfb92d8911fb717096f2944","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.8-20180819023613.tgz","fileCount":353,"unpackedSize":1031877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeNgUCRA9TVsSAnZWagAA6JcQAIs456mKOjIbVx6fLngf\nxbnw9PBRd2rUq6BOWeqffwI4OYlLvU5oURK9EB62ACjATghlN04QDZJjxQ8U\nr3oizGb80+lk3rSPzgDbOVXQkkYjQ//2emJCDGh3f2YMFDepscI7LvcstsdJ\n+MEayeUy10m2sGmYDI3WsDEf5leGdQ55G6HEgiGeMxdGQzvaFcVxB4ZrysKT\nF25u+AfEJPm8RCsflri+bvqeQRSsPQb6DtzWi4oDkn8WlRCUahwgnFrxkDgd\nzUHqIWbcTsovjK7ztBiYPElQ48F4i4TL8FENhtJY9z4RS3u97Ednb7HTdpb7\nudw2vHTaNqKWsRdebG3a8lj/ix7NxFwYc33Mj2f/VbhNqa7HPO+BdKroTp/8\nCdOjmRTNDgHtZ/31I/sc9qlx47Wwu6JRCfqjfYZdDLu3s65a/jGps3BixAB0\nLUh4NuK+PQV/TGvQUFx7tmh3UM/Re6PSC5m6jI4hXLTu+nG8j/6N64RrImCR\nWH7GF52ocfIfX5toZpSs0RHQpnWdoMKC3Xkf9k9mGae4xxG78WFy5PHXZb1N\nJ3vFed3CbGlNi5xbDokFyoDl669dEqE6093ods6j5MDINByo7sOJNjuUA5hj\nHo7GhH0sYVxX8FCTzHJvpyFn+ldbDmPYHuBSFsP0gGWDTZfqNGvjFlB2A9L2\noU15\r\n=w63z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGEc5jJEau4Ws8mfFfugsySrPsCyJwZiB5J7Wjtgsh5gAiBr7l8UV5cS18NbIrfmzdu/7UmKPnX50vgA/F864lpmvw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.8-20180819023613_1534646291782_0.6762669367350136"},"_hasShrinkwrap":false},"0.1.8-20180819165830":{"name":"@atomist/sdm-local","version":"0.1.8-20180819165830","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"1eeddb9e6b053cd1a9dc7345a9e3b7cad0774e72","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.8-20180819165830","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0QmIW993SGn3m/xkSthkj9SmSaxaTACtSUrt/4vMwJDUCsl96/QKSnPvvSNFeiXFNh9vRRmWrABQVmsZKaNYsA==","shasum":"622d840e59b11d3173cb8f086387c89e6b46d46b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.8-20180819165830.tgz","fileCount":353,"unpackedSize":1031948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeaI0CRA9TVsSAnZWagAA2U8P/0giPRnisavFJ1Tzia/Z\nLL7UhHw35KjIOARYXck0tDAYBe2nhVvJKro/4JX2O4ZdN/qpUtfQoCKKuW3a\n/0s0XbWOTvrWBQ13RryHbpoipbDYPu5ersErgT8kONPpOcQ4A3FMeo1ajKtm\nWJUZzyTPXcfGyFO9aHsvIyG8vI/nQ9YGhjifLmpAsVppjlOL4i3iiRfb+1NG\ne2YoHTV8VGACVZ5CMicVgIVuSOT1GYxU6LPv7Otv3VWdY4nwqkboI0bVuEB0\nfhYM1svamFQL7umXAXW54TIz7+zBdifsvHPi31e0p16HuctC0KTe59YIlMUT\nJNJg6B4pa9WG1KVkA5B3NJVXBNeilQAQ3IMNRbsmOd/qMDzRsTE+FkDZoxpT\nnU651xZfuoYy7DP7WZFOJXNIQV4Frms2JlTtp3rOJxJCEQMljcqQZMAO23m4\nqjQ6+cyAGmXJT44g9xQHvrzZWg1KyYKXWzBscv1I5g6rvPyvJOh4GTRwkMvx\naR6a6igJU9JxJBCc0Cxqp5/dVRua6xGU46cmfJ935fhhOR7RCyThRe34pFcn\ngebbiZ4/JMMo+//iPHHwScl0as5p9yipKtVMTejSJTcXka6/k45kGHf24aVO\nSajOjrWg8bD82yxrNj/DLodLBLu37jQaG98PN4YqycJJMZqRVcKd7SoXI/ko\n5Qae\r\n=pH/F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6xO4twz0bIJjrD2ml4IqGFY+a12Mki0FxwU41i4lfrAiAd+87qkCFeYoOaL83oKgyZQsaDr9X/oqPBn2DqZDkFRw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.8-20180819165830_1534698035274_0.1497797033200241"},"_hasShrinkwrap":false},"0.1.8-20180819175628":{"name":"@atomist/sdm-local","version":"0.1.8-20180819175628","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"b096e400df3c3d26c129287814da7971e3513f7c","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.8-20180819175628","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ekU0tblj02vxwKvEVLvxGAkCVCdwZ5349mcsXR0DH0UO229QktdEqBHeJW0bz8rQLVQbISuXmvheSxsz7vDBRg==","shasum":"ba28f01328abc0caba20dcbb1393d68e871cc9be","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.8-20180819175628.tgz","fileCount":353,"unpackedSize":1032365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbea/LCRA9TVsSAnZWagAAkJQP/0Ga+EuaxnFMY63Ssf1B\neR74ZBs7NyFebx1a6vOuMHLsgeWyy9vVsulUWk6ij/WDr92W0ZRFC/kMmHXH\nTsOQfPaoFOVWVBC3LjW8O3Q3E/6YhIstsaUiu3eS/LB/F8RkKibjH8GyIfQD\n48s2LUvtlxJUvX3fPklfwdp15LiEVBqTqt/k05BbJ+xxNLEEUqq+2pQTt0os\nc2jXCkC/8B7ISuFSTyFHaw/cOxpn2e2MK8VmUopUPnx1l59/ZDzh0aFGgWZI\nGVV2X8NBSSI3+r/ZCmHo7kEpz14j41hU7ufLsuhVQnwpJZSCKUnrzl4oSLD5\n4ZcweKBl5ma9yVDDIlHDwA/zoZbZ63+xFvn5nFMP8/7AwCRjupCRWJMxFg/4\nSbpfEy0ffA99Kd4kntjbbI1Rykzs10aK95erZdFewpMF5TnY9NUU8836dP7g\n1qI7ZnpdL8grYPg7FZHelytMvm7lM5cADg8GVpWY/4df/+N+SG40OiyRqYg1\n7UxLSUZe43z5RIyplklXSvFNzX2vCHb8LWDt7oJ2gV3tKuigCBCteQwkNylE\nLIadbMoztZayK+IMelHtXOFw8z1SyNhmWDIe2pvb+kj34Eomke5uoKcyHyrY\nqA3hAC7rUcS+HutFa9BKzwcq7zfk7UzF7BJ9biWuSoyBRRREQP3lW6DAHRkh\nXPG4\r\n=vk5W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHthVc2TPaKXoh+NGsc8R91fI1pc9fuHgCvq/N2cROJfAiA50BshE0mIeDNWbOrS9ondtBYP7BxkdSg0T5U39CK9rQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.8-20180819175628_1534701514676_0.8296681320803543"},"_hasShrinkwrap":false},"0.1.8-20180819192225":{"name":"@atomist/sdm-local","version":"0.1.8-20180819192225","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"93d5c58deca3fea3cbd6cb69f0c208ca43ccab9b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.8-20180819192225","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-m7BPnXask8Zm35CVduLQDlpJpJzXz6CGFZ99w11h30ljhEcfGkbuRQKVLuuBHyJ9SAKDqrWsfsxFTveWLOYwhg==","shasum":"03ab3ac15f08e6b7d49e7397f9c2cc6a7154b50b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.8-20180819192225.tgz","fileCount":353,"unpackedSize":1035469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbecPuCRA9TVsSAnZWagAAKKgP/REvqx+ihO9OI6TyYNLd\nRAt6R9iuB7b2cF3zjU6xMCicAOAp2a+FTY8SkGDaxrtWq3t24drF7km7sLFJ\n/wYT/6Ahi0PPAmLDNg6zinOYjeeQvEBqxKgVLUEf40AZZ1KQ+UW02vgBje4X\nf9D6LqfqPHkRlxiUoI/AgkVERA6iwjphC1+nksivCO3Xpr3zrvRH5jKvy5xn\nVX/ug3yknoUVS7G0efQWOFqxvrgK2l27GxB/6JD9UUpoEXibUU5fsi49181U\n6ZdCmmQED/Wa44jKuTj25WldCqajZauC1cq1+WU5bX+u8LZlq9bfoDnW6kBI\nNqjuMIhXiomIs+y06ogndBAPaXqv08zZCvNy/X6itbb5E/eWD1tQ3iMifmma\niJXvyBPOgaaBUYJgbQ+ts/E1dcMKKP9YuBXGJRsSba2xlO0zQ8od1Or4Cu46\n6JnVjssD1NjIeWsMI8P6GfRK5cd94eyn47xSxRBUYrerqarkR577PGU8/M1/\nQ48ajbu7yLyM2N46b1NV2+JA4go8pxjAznIzAzIffSOfADh9rl8kGeMuJdDT\n2uZH2VnYgrx2GrPPV2RRc+W2PNF6Ae0ioHRQeUQMrUyLgUeXhLyZfwnxdFyU\nThgm9Nbjqadu/xodbKEwKFZUdkxTCNPKlwU4+BAkrEI4RIsLTP8AiVBP1vDC\nr4aF\r\n=oRJi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICQ7gm94sOctk/oIx16q4NMykMR8Lre4fLumedilZdcFAiBia9NFWR4UYPfpTEt8hTilqrYi3puhviSscNu1cSO//A=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.8-20180819192225_1534706669412_0.5716741856619703"},"_hasShrinkwrap":false},"0.1.8-20180820042253":{"name":"@atomist/sdm-local","version":"0.1.8-20180820042253","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"06ce5e69aa228337e990e1a2ee97647a0c390099","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.8-20180820042253","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-GyEm5BIIsy0L2hWBlbFy+/hmOXG2W7rjEeE9h9WMdBcfQhi624uoQi9X6XZbPPOij6mWRGcFhsp+O/YVEXLWDg==","shasum":"78a61a4ff056aa2938a7b7fd125b95434700c301","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.8-20180820042253.tgz","fileCount":353,"unpackedSize":1035444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbekKVCRA9TVsSAnZWagAAu48QAI44onr4puh6msahE9lD\n5b392wxqNuKvaqhX6nJfv2NbG1ouJkUbZch5p835AFQh0+VbYzEL4Q55RNYg\nWD5Ry4Uc/2aDaSW5Uyg4GnfNTQjZ3WP1YHMcqpARz7BceSFWnsoIGMu8i9X+\n44/XFrz3k0k0D2E59ewrU1ymeSukatuDWDqUH4lV81aXpeaMMO2TrzkFEnyL\nBnvLX1pjqbPWtmdamBdmtu9H4xheFqWFNVFAXkx51TZL/OlI4VsHkcrjjldu\nBnoAD2tl4tdWWfMax5EcTgpf1RYZf7PjPHspdEJSAWYW0iyoDkiOXB12pCOt\n72S7GVKyYrAMWTsf7AKAFTPM82A1C77vRU1WV9DnUducWA8iTA22sbM0ckN+\nYjMrpQN+EgG6rwmHuR0ANcF9qzpsiw7A73KXYj6iBDdBu5EG/vQI/lMaGKiF\nj8dAE0PqxFzhoo+8miNH0VEWRMZOjarQ++KZZHBRRt4xqj3v81HqPGXm7J7G\nfsWaCP0kRIWWnvs8+CbJUSQx5vhBAizNUrPFMDB0BVPWRYL1bRKm0+ZkwxW8\nGruuRJe61mQB4aKWxpZna+qOJFPGNTEdzlz8LpqGbh6DDmhSft4lAwyOum+H\nimIxggQqaNkO6aVzeouPJNQp3IvOLTYG82SU7uP5HCj/+yQk2Z7JDuBXNGbm\nQiMI\r\n=adrY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPKqa7Wj7ff+4bNUJfl4JjJcfGxEhByoDDEFnnqB0JhwIhAKGDbEDAmixAmAZ+KKvWmjhNmtFrdoP5RKMsn8G7zhjA"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.8-20180820042253_1534739092838_0.22266362294245545"},"_hasShrinkwrap":false},"0.1.8":{"name":"@atomist/sdm-local","version":"0.1.8","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"06ce5e69aa228337e990e1a2ee97647a0c390099","_id":"@atomist/sdm-local@0.1.8","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-l99ErgH/BTDuXAltOVmXWqhoWp8nLVsuoS539kwHU0yJf/nPH02YkQJQDTonC2KcL1SfPbTocBMhhTp5gK+1uA==","shasum":"fab5936679223839ceb28aad379f03e800ba7c4a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.8.tgz","fileCount":353,"unpackedSize":1035429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbekK6CRA9TVsSAnZWagAAC4wP+QBl4m3UfxAD3HZdlA6i\npd+G2HWy6SvjjFwCqVwLr74/BoZvzyiCfpGUkLVwnIfQZvmzmG28X26lEzBF\n/sivB+/4jfVA1jW77IBiaGYjve8xKkiImDX9ULMVbu3w8VQU2t2RLu87wCjh\nvybT6qzERiOkqdTtsEv9jXlAziYI5jIFkRHZTRyn7BaXV1H1l+dZbFIEnp02\nO+NgTY0Hh0GnV3sxM7Bj6GX3oOUBvG+9zZRKiv0H54z/DSLnujNlOOyMyTq/\nk+wYq73yc5sUezjKK6spT4FrXLqrRINpLcqt9asEYh5U0cxUse8AAPzYWAUA\nsLqMdUDedVFcpYAI3MOSk3jKcmE8yCXQYvve5gVv74UQD7Uw+cEEjVfa4wJP\npgm78QOqtduqZ+lMMxL0ImRH7YPjuoBSPujLUSE0sQGaTZirwcnqvMawKj+d\nx7oLPTtQCRhWrXEIiPkB68FEk2drzr0GPosxFBkC2BV3iIXYA9PA4Ayz7oak\nLbflpCOeBm57VbggG49mbNqaH+ZOxW2C9j0asIVUn2MJbh8HVai4i3VG8LyH\nhvsLGqdyO5srOd8N62kS0YMRF+jrn1BLqCr3BR40eA/C3R8qt4fwNgGSKxU/\nfNTGeC1D1bOkY3x2HtKw62M8EeLIyWwoQAnlllLUffiKYgja/QukYTUEMnbA\nxM+z\r\n=dbaC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH3pbp1v5YCIMaIEzlDZ4yqspg8oMU54E95Xx2hkLJVgCICk91hmbcEQh3xdSmcMrHnjyF5T8SIWUfrCblIorNKU/"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.8_1534739130259_0.4536163811484166"},"_hasShrinkwrap":false},"0.1.9-20180820042625":{"name":"@atomist/sdm-local","version":"0.1.9-20180820042625","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"5d698cb1b8705bfc0ee49e9aa175160f8e8e5104","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-20180820042625","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-QzbNH0kA4prhz2toFGMpb2rkpc1Jvj2g+eNEI8OgXIEtBWoIZ51ODmfJXEXEvL+kyrjtznTZ4TIMJ0ZEa8FYog==","shasum":"f0d85fb2f62f7bcda03800cfb53760d7b3cdbb58","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-20180820042625.tgz","fileCount":353,"unpackedSize":1035523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbekNvCRA9TVsSAnZWagAAWBkQAJfI/dJEZGlggfUFyIn2\nx/9k0lQPTikehzFdK5Fm3d9RfBpT1G45tPxg8MAA49revNu/vyKfYTVJORx/\ng8Yf4kwQ4QYlyGSl0UKV0Nwf3oQp1p5vNUwgqcLWo6CJCGca2Ab/F/FlGuVG\nK5/yF1SUlHxyt/gyuvANdP62FKvgVYZ4GlOIpFqDCBzDO0RiV3vmBgrfhfnb\nmaPfAPPbwLt5CeXi3AbzuE+IHWAgjFGQmUkeHnzeoEef9BuFzOpy2mw6z6Dm\nF+MMzjvSyNFUO4O0woaWq14CxlGKK2mZyLDIP8ikr0o5mzO0AY2yIOLtAtXb\nsYpramU8+7TGhKqoRrptVIfiamFJosgJ7yUHSmW+DIb6JzqhFVyMhOIkBQc4\nkQDQ56eb7AZCpNmHjJUUCba/n701g0GmUHRWYJHLXP7chmulQPEeWDzC28y2\nlaxVgXyLAdZPaQxeMa1CSETVoznNRUBDQB6Ho6EGI+iuqrVwrHWjBwXtVbOz\nhq9imXPXDBj3dxTO6CzhlPx6S6BxkfdZYc2UauYrXIz0mD5wbTpKjg9ArKj/\ns90oSyQ/FI+1iUozFU+gZoCtH58IiPCltX2zG4LQ4Y2fdOqc++8b30Huehc/\nPbq87/eDoPsVuilknoDkYFRALgehEFgZD+Vu68Wqf3pR4y5RV8Xqi7mFfcn2\ngI33\r\n=tZJM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDYIWIsPR7wFMuCSYM+jSJBC8Aj1GBoE1cCwbZA5u3aoAiEA7rl83LHLNBMxouVJO7S3O6gm2YZGjNraCuMq70Z5Oyo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-20180820042625_1534739311371_0.41080377254527956"},"_hasShrinkwrap":false},"0.1.9-issue-65.20180820100355":{"name":"@atomist/sdm-local","version":"0.1.9-issue-65.20180820100355","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"637a721b00e450a7b058704eb4f6911374ce3f91","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-issue-65.20180820100355","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-YrfJUqlsB+XlJNovqkjkKHsUnTgWmGdf/t6HYr35GtDcBKz4a/k+e8CykXZxSWbN7uGnVcKEd440Oq3lkv7f5g==","shasum":"6ee4850ff09e1dd48ec7d19e6b028a2b21623567","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-issue-65.20180820100355.tgz","fileCount":353,"unpackedSize":1035558,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbepKHCRA9TVsSAnZWagAAKgAP/2uIis0YnM+y8wYggCjs\n8I3ifMbRyxiiQDQy3N5acBOX8WQs6a0Vd2omi4B4OS+NVcysF5er6jpgSunG\nHnuxLOMzU1+tPIRcVMQOfnAZGhov44QWUOT7hNkiEroQmm+2pyvumJsfNEG8\nC8vMP2BMxCSBbioPuXWv+7DcchtnnDFI26YfhpCkT8eywW+C2lWR9ZF1bYCM\nifEaA5C5HnATGo9HXbAk4DcEku+TaRRrUKTryt/M3mW7AdtAHSYtcCVkTJPC\n23/V7g5IRuaaYT0aYQvpNRATUkE7TW9sLE/Q30z3rrOxiwzvS8WHVvCdzcmu\n7LfLG6rKoRRlTUt7cnOGcO0swbsTPZQfcoFk5F/7JNtv8+1sxsBmqHIMzhrA\nTsJ+FnoKxdO+XpyJ3062qHmjXO/L+stPiDqioiPu9D+vtYwvzOZw75mtvQWa\nzn5saTzMc2/4HJXD1Zf1Dk2k7IbT7iMvRcz+PdpI10KNLt6NCG6KVyDyXJKL\nxrmFlcwrzlS7OUq6GSV0/XQuiex6sMfXqILgyl1XL1Pae2FcxSAa0jZngsAS\nsROAlvcTQe83oDNiRGY04Na6hYggrGE8hXO3hIPMyQW+q4pHAYyI3gG2NviL\npWL7Spdqq+BiobhoG92g8uPyopSYbzVjvk7Bz0srUCg4MVKPeQ6vcmWUrLk0\nR8hC\r\n=pDDy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsf/cYFBnP6XXbWlTtXdDlu+obimpr7oL2d+Q+tFzTGQIgOf2oOYG5t8y+OsiW3sAxOPt1JVkCCLBZ4IPTHfNwHpg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-issue-65.20180820100355_1534759558897_0.7182823216895304"},"_hasShrinkwrap":false},"0.1.9-update-githook.20180820132555":{"name":"@atomist/sdm-local","version":"0.1.9-update-githook.20180820132555","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"ed582ee22b94572318e886af89b05ac435527f22","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-update-githook.20180820132555","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-zu/sgNDu8Da/TFDmEOMthediA8wF2fUPcQDjWRCoT9r9IpRbbbRaB/1B/XKyk3D3hJLTr+kgrdxF7w+EdiCDtw==","shasum":"52a4859557b03ffd904ea1fb8b5cfcfc521cc769","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-update-githook.20180820132555.tgz","fileCount":353,"unpackedSize":1035952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbesHWCRA9TVsSAnZWagAA2GoP/R24f1i4T4ZtFNooUpKs\n0D0Mk9gXccqVF2lBpzivxpF3FFzJ+UkSzt0XSWqOAG3zfYogvt0kAOdfm0lq\nYUx7pX28YhcfyO9qZJkWJZ4I0M7EhQLp42wVSBTo1YI7n/ButM5xMJ9crZEp\nWCRHHuJykb7zP3+U+6UMe7AUxyWdzERfiDd7uL9sddkJvxvyg47v62WDmNLV\nTIf1X/7Oc9xnbzbFCqCeQjDKnYlO7ZaQq8XJgm7eHTwkYbdm/ZX7MVtdaaR7\npKm0B2xXrGFzUrb93sqmoGmSFFKWVNVhhDshdFWvAK+n1YgCh1oIa6GRtyiA\n8ght5mFSPIpEQJsns8LFJA8DqUgZPgjAi+7mjVpdc8Df6tRwtvsOOBclC3G6\npKxzGgk9rRvDNQsUBn6QDSUxRSMUGWxr47UEGfvJtSRCmIV77TNesOdku+K9\nwAFtba0DzYm0Hnz0eHeK9htcCIE1rjanShVZKqqkNtZlejpZeXD5kroVfNyD\nrQeAHgBCT7nKWydxl67gAkr+07qqScinazFgh3PRUUVxMKjizON4WA8DiVrt\nZbaZkM80UJg/yQFnNTtlRtviazOc2DoOYr6/TzU4QLEA3RyJAJLerEhXJral\nY/a1H82okA5BQ7yb/6QXo2VXZnchUYQVnyvoFo9q/lbPzrJOXJp1dVg/fEs9\nr/oS\r\n=CmwX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDd3/GHAoosXKwk9dSknlmmGXblYWJJ/lljwvnPyJcELAiEAhIFdg+A6QuVRa+mKPxZzbGE3O3MC9hcj/vIuBFxRW/o="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-update-githook.20180820132555_1534771670037_0.6678871977469134"},"_hasShrinkwrap":false},"0.1.9-update-githook.20180820203425":{"name":"@atomist/sdm-local","version":"0.1.9-update-githook.20180820203425","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"cd430282fb8c4928b84f6939d72e1e7ce1421174","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-update-githook.20180820203425","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+ybb+P89Uqtsksa6WrP5n6tZlobnL+b7hQD3V7YSklx7qyJrGtQXaTGX1Wf+vi9qps6sJDL58/NQ9Zlohz0xEg==","shasum":"330f3d291129ac1226fffc8136f943a0c962f5ad","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-update-githook.20180820203425.tgz","fileCount":353,"unpackedSize":1035305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeyZWCRA9TVsSAnZWagAAfT8P/Rs311dGtk4DYUCUy/2Q\nHcbQQAJp/gbksJM2NY2lzkOs3TwCSrmTuaUPpvAah1leUsrUpVAdkWUn7Jzb\nJ+9RHx9xTRw/oSNM1UQuABqBCNc7tsxDXBDKzFDksLUIcCgQqgpSyXt4k2bH\nGcQzuVBWbog7vrLAEkFrzqV2q1jeQvQ9ntL7vkcKU4vN4aBdjgXzFiDGHan4\nyCGXqty++cl0pgmSyJnEGrNcbbFkFVgqmUC04EZqERtEyzNk4CgmtMSy+C5I\n4llqQ55JoJ4Nk2SJNIL+pymb0eYKpyHGZHiKmeIzu418ZywMvfhG1vXU/y/J\nNlMx2plVMo2vAyAiVWze8bWukkXMPINCjThPdUoN3dTr0NeYjx8IsYxNn/XO\nXBzv5rLEGzqkIdLOXrIIGAU83wr5H0bx2GdqgnXoatZOUMJ3HeD1gKn4NfUL\nc10lnc1K9GILFG53rCANUeOvMpNEz+xX06YAF1ofT6XtdS3Mq8O06rZHnH02\nQXo5WXKafQ9745jhghucFbzRMOx/s2+qWFITdxZjdLKjr+j8F4pyM8BrjASm\n5pE0uAkShThGd0YfM5z/lG2IRB8fJsshOUTF/qw9ENQLKv2y8muPg/Oq1J2y\nKnCEiuUmu+sm5a0z4kXDUxG2SFTs9y9qpXyeYxmjhPlVcMy+yVBPjG5SKQFV\nESB7\r\n=r0zu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgqwuNy5LCwS4B8jqw5RIIHWTmhVnyPTqOBQT436O69wIhALBTZsAnu9itAGuDEPyDCP1F5a3L+8Z3EYinY3vIEM5P"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-update-githook.20180820203425_1534797397753_0.07921877178243708"},"_hasShrinkwrap":false},"0.1.9-20180820204936":{"name":"@atomist/sdm-local","version":"0.1.9-20180820204936","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"4eae4709150857c6e9fd44d8b48ec4a0d110c9f6","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-20180820204936","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Y/w/G6bhrX1D9NX7lcFuHtZ0I5/mMd32B2BzP7I6rL8hCoR+XyYArOu5yT7zJ0aWncF63i3EDIUszGR+0YOD6A==","shasum":"9206f81b24dacfe0f5da253048a53f1b10943a53","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-20180820204936.tgz","fileCount":353,"unpackedSize":1037053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeynsCRA9TVsSAnZWagAAQm4P/2hJqmOdYxgNR8wmXh9/\nlQbqA+F7n/M/sFgw9qUbbOcYt/+a6RVJEyvWqv9cn3LBFwF3fCt/Y6zyma2F\nhELBN7ivlzeTNknotXsjqS41Z5B0OzC1ZMUMncwM60zz0npAT9oJ8b0yeco7\nEayTBUsiyoX2DF222WxoqLlvNClvwLUmO5waJNspCT6OQOF2TMGxdoXtylkv\nt8SaANl3xrp9yVyMoJHhlRBJN01WS27IkSphXnVHKxAKMRKPwAOF6Vs1YF6o\nRN6zjJhrTkVtj1kcWnB7A4bntB8aZGBfruksOKDtxoWFhDhpS4z+CI6gqbGw\nRyIyaFroE1N6asa9XHGkJwrJ6obFytzhXRuHJGNdjAOCOBNdzEmD8ifqRoDo\nBr7xadhsfLV6YnYQ2RmUpBhQRfMx3ckP2NCd5wUBaIupGaJOhvNwC4Y12jIe\nl0x18+getOoZzMXvokS3uodp9vrASyxyCuk6LfGe6lkewGGJy3Hdr1fz4YzD\na8ZrUz/w5f7ZBZCaLva6ieysQgQCXQFSp4xeShXH/+VsgBtE1gSsHJnneObh\n4aEcOiD81nj4aF8tqa5pz3gHY6LEPWCniz1ApsXgl0qpeRhp//twtb5WRz3L\nLqhn4tuwCIzxITXXgCn5SpwzrmSPaDcOT2JlU9d9x7q44mm7aXE+wOgYR/lr\nhV9r\r\n=I968\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2aMV3pMMgsJdMqW4zxIUtKwx5SaLyo2VEeabEj7ZrrAIhAIBdPhVzVbrAUHfXx+uN2gu+FDeNzeM5zJvBe6LYoCA1"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-20180820204936_1534798312814_0.7737297119412154"},"_hasShrinkwrap":false},"0.1.9-update-githook.20180820205052":{"name":"@atomist/sdm-local","version":"0.1.9-update-githook.20180820205052","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"4ccc662cff5e2baf4f50790b388cfd93ed53f0ed","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-update-githook.20180820205052","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-cxdnecfbBCR9tdU9553UXlCz5fBzNmo+TSd0q26z+kHEIoL7I3CVZBiksj2Xfik05eI+TPfeBUw3sgslITD2uw==","shasum":"3fbd3ddd0bff1c6bd620bfc363b08b7a84fd68d4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-update-githook.20180820205052.tgz","fileCount":353,"unpackedSize":1036832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbeyo9CRA9TVsSAnZWagAAxg0P/Ah60/XEBby88mxJS9Eq\n69FG6OTuou/UTZ6WPmr6M6WLKY6WJqsJXREihfwSv2xIwMvHl8GmzDRi2WPH\nsQl+7GxYIl5SfvG1kc63NJ90xqUD+q7fH7f29z1EfIdhT8pkw24TpoSDuqsd\nUqXFzPb8T8I2WKzUqC0V9gh8qFXRmB/F+wq4SqwSGZ0nc0crXbpQcHP7r8kP\nMItjhwWGOawGw/TAgEYygUrqd9E7xDWG5IsRvn+DtUTRDLEnhc4Y99MV7NNK\nGWvC7Dh3Edv2CZPverOut7/IhwNAnnDoGwMQm3bGJdzZXr477BZl31WbYmnB\nKXH6X62i4/A2MOWueWh6cmKJLDAD0IsoCh2laew+Ngub76uGcxHrcqNQQM8V\naz9jMtL4OTW5iYF4uTBiaxm8UQOdqN9In4pg4PjdSNp3rIBLFmsCuKUfheqq\nK+wxqxxc8p0o/kTQURouHdt3/wBKI3FJgT/HDQH3NaOcZRT45OJaaeBveJrU\n05iwFSbElQrvZR4lQSFQ+1PLzzpE92dwUw2VYBY3320253+8cIM60+2ydTuK\nmkfTCmcR8uuyp7AdrN1uwP1SGdwtxQVkD8c1ajNpuTdvbK+jEepJ1L4ps0mM\nD4ESPrWqU4m14NQmpIxozUBwXPredzVovZVt+00WLDvwzcTHDXN9NSGzyP4i\nefJr\r\n=XDoP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHaayLlHSA6VuFodEDeNTv1Tn3+ZpRzrRrA914Uk7ac5AiEAsBzj6Jc6ybTdt+6a9z2yPvGgGTCzvO2XSTKWWZKqhzA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-update-githook.20180820205052_1534798397074_0.10523888884954702"},"_hasShrinkwrap":false},"0.1.9-update-package-json.20180820211948":{"name":"@atomist/sdm-local","version":"0.1.9-update-package-json.20180820211948","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.1","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"ed5bc67cadfd490b6d84c9d960d18519202571fc","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-update-package-json.20180820211948","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5A1J865squgH95UycQVwEBg/1R/Qm6pX61NE63DeVH+Ar9TjMb9FleUbeLQ+uS+m+fY/GipIrel56Peobw8FQg==","shasum":"6c1b60ffdae59dc1ef03c47168afa1fe35a6440e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-update-package-json.20180820211948.tgz","fileCount":352,"unpackedSize":1087099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbezDwCRA9TVsSAnZWagAA6ZcP/0pFkSy6+CYhDlTvLTid\nz/EhOFjGoDRzmfjqE+N9vmKG1V2C0U7PbrmKlNrEjClPb5qQdd+Z2pi4x/a4\ng7Q2NNIi2iPdHasBegYHsbUHqLN7owfx00AWQ195GNEsKt/hdKC5MNp1Dd6a\n1JnyyMWCBtxCqwcBqoRRfe4RVpL0Wo2Of3ox7vE+XzuGV5n14xbyoXl0pon6\nJtWSDKe9TccYRAHergKdlapAaydVnyVE3wT8g8bQq56g0H9rx6h+5fsI1iWN\nEqgZKKB67C84BW4thKffxR9LmIZSohvCsPfkdZLv9kFig29KBQ4TfNd40qK+\nPDAvPmj8wx1vkrrVQdbDFIoF5P3UmFrUbK4m3fxaCVcDQAzOqp5CfgPsGQvM\n27h/epIfK1RKYJlddy8AeDO1PcEjFR/aEJQwe4JQhzCmXKmOp028x1r7X6Mj\nO7zzFXBS2Z64oZCSkTB/eg84VH32zCLj4puO4KcjO9e+jO46jVpnNm/EVI5K\nvhO/DCMAaekT8SFKE5s8flrKjVuJsUtaLEaVnsq22MSCQNK3j7B+SXUVZE1x\n2rLZkcxx7hgS0wBatie/SL2hIUOuYud1ZqvFNtHP85LwsxG0QXvoF+WU0s7h\nOwA3fe7FE5s/G7JGi3kFmkJoFgEAbSmO95DbkVgj52ycin3BpUOA+NWub2YT\nkE64\r\n=55Jb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2E25fZ/oVq83sBjOcejYt3Gvt67ltGd1e/N6mTbjJogIhAMVGiFWoT2Nmzt+8aKCNEr2qCmFm4pr44inp9xg8OmiO"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-update-package-json.20180820211948_1534800111978_0.6621180955769439"},"_hasShrinkwrap":false},"0.1.9-nortissej.various.20180821001332":{"name":"@atomist/sdm-local","version":"0.1.9-nortissej.various.20180821001332","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"0a7d39c9295349126165ee46368a2951cd5bc534","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add git hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-nortissej.various.20180821001332","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-SGzoujSZqRpuAHgBn2FvlbA58uPXNekDqwwjbnykLnpA67k/wV32vvWOR77ONbolMSSBSRlV097Q3BPeb4rZ6A==","shasum":"959a0cdb9dee180703e4058eae656cca05db5e28","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-nortissej.various.20180821001332.tgz","fileCount":353,"unpackedSize":1038746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbe1mOCRA9TVsSAnZWagAAUEoQAJAmamOHeYBMoEQzCaN4\nCior0o70Ix6t+6qUw4g7SBXQEu198snOXg+1WiTFgrltEXqes18N5QOgG+K1\ndC+ms/OybAi3cDB5hlsl1dCQ3CiUG0Ip5O2UGkAokyCOrWlBAvcjzIhLNqLv\ng0yhdBfqnEZ5LfZ+tBqHMsi2THssKH0Wjnw/TrntS/3OhL3KOjBSmOGH0Zg8\nD9l32JE9CsEgXAhroQsUvzHlWJhooaaqBzwX7pL/bG37b4kxXjL73o7Z/V9A\nskebXnRPIyP9d3SRVofPMaoWV5c8z4rTp5+PVkgxQ9Nv3I3cEB/bVYB217wZ\nRBG2d9pouJToz4E86rwjw31UAcWhlBmEKzqHvQEYEcedNd6rHklcf1wqH1v2\n/32vB4f5NW1b1xk5Srw5Oqfbi8IGwQNlhW2XP5mUGkkFuQgVIAhfCAc4tVl/\n6fqj6u6A8YQ9tEuFJQAsnIiplNgNtYtlmX5jFJdRFDKNooMhPM5MErja9Eio\nXIy+3Qi/YDcr46hdcGe3TnlxyAdt6tE5Fsqn4HJNoMZMd4vYrcH1A3oXMtDB\nGRIVxELR1pZ9Uib0plEeWXM5h9FPXFnRL68nT8pz+DMjnE5A47o58yeCikMO\ntmBrDxaNeDP0nNeFFRz7mgdl9xq3JQOSZHj+gyocdJ0aruLY3S3LPBq1KomP\nGFaE\r\n=YxKG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDs4qpbw1pJscKA5hqnydxgKJQB3Eqbolf020PeW2kY3QIhAPz5JRRcrVAc8gvWC/Jp7D6wbX6jQYZCl1DSp/VkNP8Y"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-nortissej.various.20180821001332_1534810509511_0.06705004190244357"},"_hasShrinkwrap":false},"0.1.9-20180821004213":{"name":"@atomist/sdm-local","version":"0.1.9-20180821004213","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.0","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^2.2.48","@types/power-assert":"^1.4.29","axios-mock-adapter":"^1.15.0","espower-typescript":"^8.1.3","mocha":"^4.1.0","npm-run-all":"^4.1.3","power-assert":"^1.4.4","prettier":"^1.13.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^3.3.0","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.8.3","typescript-formatter":"^7.2.0"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"npm-run-all compile test lint doc","clean":"npm-run-all clean:js clean:build","clean:build":"rimraf *-v8.log profile.txt coverage typedoc doc build dist git-info.json log","clean:dist":"npm-run-all clean clean:npm","clean:js":"rimraf \"{src,test}/**/*.{js{,.map},d.ts}\" \"index.{js{,.map},d.ts}\"","clean:npm":"rimraf node_modules","compile":"npm-run-all git:info compile:ts","compile:ts":"tsc --project .","debug":"node $NODE_DEBUG_OPTION node_modules/@atomist/automation-client/start.client.js","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"npm-run-all fmt:ts","fmt:ts":"tsfmt --replace","git:info":"atomist git","lint":"npm-run-all lint:ts","lint:ts":"tslint --format verbose --project .","lint:fix":"npm-run-all lint:ts:fix","lint:ts:fix":"npm run lint:ts -- --fix","test":"mocha --exit --require ts-node/register --require source-map-support/register \"test/**/*est.ts\"","typedoc":"npm run doc"},"engines":{"node":">=9.2.0","npm":">=5.0.0"},"gitHead":"586dc8e5b1474cde343f1452f50828251e89cbdc","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-20180821004213","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-4ZdRv7w/wcJuuOysEI8cuUnfQhEeCvQRMnp/rH1Hft3+O+iP8pT+UfsJqs7RawW8/yY3cgH4/aAei7VJMKTENw==","shasum":"1785c032556ae84d289bb85d15b1fb8ecc315289","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-20180821004213.tgz","fileCount":353,"unpackedSize":1036817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbe2B2CRA9TVsSAnZWagAAMsMP+QBSrMKbOzVRk33cvBxI\n6/0Fni8Pcb2fVnUEvasw4qOpfPDiKc07248fUf759tO5ZHq1WQSc7Uym6Hba\nFs1FkRC0FVsouxOp19MXSxkZ7aAQEwN8zRKu0D5bH3IeZ42trht3dyQrTgeP\ndQZmLb+WliOXKTQIDQWzPtLdt65PrGdaSA7tTC24/MWoam7PT/uqHeG9Orf4\nc/u+Qz5ESUKin2BnQBeswxfj02LvwoeBKT5+NipnTcVVFgXTjjSkpLOLSp3I\n29CJlh0F9rrUwXn3vzw6IvzGswVjE1eieyRmV5HfqaFPQJCj7dSBttoJmyxW\n/T1BVXbjL0DLkKMESSw4HdSGwhhxTggLaO8xKHzxmKEN4EgRx5o2x3YEW+/b\nMeNE/r3QZXIlmfoNmNGp0mg5AVU6mFbM1Iw5IMkPIq4QrkK0qzbvzQXgM0Sd\nDZB+4huO7Ofig+9diSZQdJaIViH6kl6al3j5colD1sNboUTMnS1fFQqXSDAo\nbO6lf9BjMk6nZP5eZ6Omdh4e/8ROT5zvPOHslrtwJurmD6Va6CTnIume8zJL\nDudViOkxw8xeed82Fkw56teGcAbSMxGEeMvvh/TdMclWx8JjOk1ZfjuPzBjZ\nsq+OCWk/ZY5JYfFgcVx6DTMVYI6iE7757zTQXP0wC1cPQPqEMyCmLsXogfJo\nutuc\r\n=m3GU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8acC97HUAJH2TUPjBkgxwXDNWUHY0OxPeNGXhU4EWuAiAlwzFoR3x1cyG/5q0nD8da3GBxP51adzwxmz/qR+cdSA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-20180821004213_1534812277689_0.061595541384212416"},"_hasShrinkwrap":false},"0.1.9-20180821004240":{"name":"@atomist/sdm-local","version":"0.1.9-20180821004240","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.1","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b9cd16ba745d0f40ef00b0c2fc49403860617ea7","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-20180821004240","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-yGEcrWb5ecqDyerkxgH6E+iuggvcmhUBV8QTerITXgiH20IvFb9CtHpHaMxMkM9dP4zujdw8e+FOG+3uPOsdsg==","shasum":"edd5027835883e402624e12617c3bd39f967c4be","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-20180821004240.tgz","fileCount":352,"unpackedSize":1087013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbe2CYCRA9TVsSAnZWagAAfJsP/1+2cZnelcF5s4VW4eDq\nBxZErXiq6rhljP2t9u+Ymb3wQdsOmpO6LviUzDn4Kk1EbfTpG7isSCkXWN1n\nVru9hEtwurFwSwaDr/gceiCXQg5SRo9IFY/bsgtqmDaIvt7osi6xuBaAt5Cs\n4rgLYg0wEO2Cbpg92aKwDkrz51/6hMiMTivLb+sF0whhSW8c9ZyrDxNTXj0K\nQdfwibJVW0ItrmbtcGM01mthDzvrsObB8IiUBnxDhtrswVuPhJrnIP6HCY9n\n2eX8Fvjr23hoiZlrcEFwAvdAHcJCBLHFPITwzLorYWWxvheaviaPE8nnrDyY\nufQK0VNWU7dp/0UzaSEBnIEkPL/VaXGlq8bj0AqrtdM7ZIZ+LT9v5TcGp42F\nJBrezD0LiTyRkWvMET4sRFasTFZTgE17j8cNkyKTlBYDJbt0EtbZpSH0jKYU\n1jmLR/scT3n4cBmA6wwjwEwqTl2RUpIay9GheeEJmRtWRZ9wGUQjBzfVk8Fh\nw1deIev5Cu/FautJhphAElBtEBed1/7rwIBbkyg8DQqNuGTd0R6Niq3X4DgC\npW573DcQZXwSlEq7jELNSRyhp2Ss2F/lE41kDMyl2elxF31tZYgJzjowXCo4\nlrw8VK8IojWc+7iHBUsIc4bA/2O32a4ECoihRA6JiGbiB22aKe7UGW3ivrgX\nGUf1\r\n=To5r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbdqeYK54K/PjlXHnXzJgkQ5H5XVjqdwepm9/NmLXxoAiBkPT32HJXzaBIRjLlmI/lunXkTZfjH7B0zGB/9V8VTYQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-20180821004240_1534812312265_0.2156505792825143"},"_hasShrinkwrap":false},"0.1.9-nortissej.various.20180821021132":{"name":"@atomist/sdm-local","version":"0.1.9-nortissej.various.20180821021132","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.1","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"fe10fde756c64d4b6284661d76b1941a77c8321b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-nortissej.various.20180821021132","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-iZKilEY/4XTqeno+ad1zPfPznMOxIU3l7pqVv8ZVdgwGSLWSt3PVUz204N4zxpzfad3jHTVWT3YFPn4wHkjb0w==","shasum":"d88a2da8a3e9bfb1bf6b381516a11bbbd05700c7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-nortissej.various.20180821021132.tgz","fileCount":352,"unpackedSize":1088525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbe3U8CRA9TVsSAnZWagAAohcP/jga+qpOxinu1KAOQpEe\nZru2dQVNiOfxFuXQiwV9rURBbE5EU9tA8ex21re0GNMFnC5NoMdFE9Bvavt0\nRkzRHsHNDKt4tMdxrFemlqlhtstHguwewxR2X6kcC2qAnmpEqanBI++hEFYB\ni5thtHPk60w827py0yMh/oyJ2aW9D2qn4oJUe/tp4ZqV+RK2gBqj6i1BFkQX\nOT+3TGdt1XHvPAcXM33RH83Zq7ewKlZ3XOUOvZYnEraYt3cuLD7qFEaLx+9w\nd8p7YNieJUYiE/W0qqWgK8AMPm1h7TCa+G48xhRL5Yy8XRJOu4mc7RTqEbef\n+xo1/O3comiuxyJ2uHXmHqcEkkSOFWbRJBhLb1CRwDYud7e+yRuFuEa6p2VA\nhfT/o7cCUNxza3fNV9XUnlifDoGI/rkUflhz2nsIUhMVrV/Lsc39Tm1OEQMJ\nMYDPb1wxdXSQO/SUPRbOd5Uw61J9D5oU6RbvVcKRhJFC/EH5o5Cp0tnU5nfc\nNdzX8fnDZNuPhhWLTzy/AYsGMUpO/6eXUKC+1GmhlkGmGxlZhceEXNF8PCOE\nctrxrQ+0MgZSFt8p9yRo6+fNUOqeyln2gUKLYcSbptBBpckkjaw0wP1sEHhc\nGPXAMcJ8gkaehbsyiSgV6MhgQlwmxV8hqLCvlmrRN8mWsisP2cRNth80QEHq\n/VDO\r\n=T4lF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJGf2WbQo0GrRDUzy/lK2VALljgNIYnS/5jRitVjleQAiAxbNa7LhVvhIo3QbKY0vkJnpC5FDIRRKChByr0IoP3Kw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-nortissej.various.20180821021132_1534817593143_0.6441369914816146"},"_hasShrinkwrap":false},"0.1.9-20180821131200":{"name":"@atomist/sdm-local","version":"0.1.9-20180821131200","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@octokit/rest":"^15.9.5","@types/app-root-path":"^1.2.4","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.42","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^8.10.17","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","app-root-path":"^2.0.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^6.0.1","glob-promise":"^3.4.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-notifier":"^5.2.1","open":"0.0.5","portfinder":"^1.0.13","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.1","@atomist/sdm":"^0.4.2","@atomist/sdm-core":"^0.4.2","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"0fca31980bbc55712e8cd0d2ff69fc42375e9fe6","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-20180821131200","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5QWx+5xN8FIw9+Sgr447ie+7VFuLt3JBu3tFqo2ij55crmFloULFWsYFFU9Xn75IvNTj6DG7VvPEzJc4QHN55w==","shasum":"baeba61ccea6f5579872d2304864f28b9bc8a802","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-20180821131200.tgz","fileCount":352,"unpackedSize":1088815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfBAhCRA9TVsSAnZWagAAy/QP/jDeqHGdiHYdPDLSkCj5\niII0Z+8S0ikPHME2qmAjweu9qcZf+w1D70Ks/Nw69BCJvg7OFzk+lIG8ep23\nfQnnkwW2FcFllBTQF0bCnh9eYSBiPiFXCBfgSxgwJBByheBHapX8oRnthySn\nezUwdbP944hvaRjodcSvFsXNhbFVk7KiUB8SCPoSFPoQ5Q0leyrIW1cMw1id\nn5b48sdHn6doI5rDuUXD8DEZz1/r8omQwKbrE1wjlqSeGkFbYm9XxOaiUPJm\nufrmavMOVZUkdgFI2bSqIziLNM75+DbJ4y0F2P/cNRWwK0ODQGT/o7k+430v\n1+qGiW+gzYpXlYn8quRYbws5WUWz5GSRV1yUvZ+Jrylhuy3sqJ/twPolUB18\nPO1J7VIJ+5RgJUqWoMYxWgZp7fPRhcpuulfhu6Cg+Xv6xNKCiPCh3bhYwoTR\nZqlWOTq2XEoGcV6iMDaBuJS+/y6/8LCYgXNF6PynV3G7nmB4z8ZoiMillaxj\nU+WmyXXBzeCTN/jsBQC84B7HNJIqch2CZJ9FKsKo81o6XxsUdE8ETmF9rY8U\n8mDWzywQ2RPvP8Th1KWWpGq7kwoURx+U1HiSmgndwb73EOmQgGRtQB+WOvLN\nOXdv0Eu7IBHipF5/miSmDDKr4MuBHzYbZjCVUiGSg/KA1PNS15QKCBmLxLxo\ntceb\r\n=Rgqz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH0gXJsTzyxB4M6Cl6vGAscx6d43/V+NfIi7VSGMKWl0AiEAkLd0dRUpEwgpuBUCAr+sEVf3MQ6yEEClm9EbyILU63Y="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-20180821131200_1534857248089_0.8540516169268795"},"_hasShrinkwrap":false},"0.1.9-20180821160132":{"name":"@atomist/sdm-local","version":"0.1.9-20180821160132","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"db09debb5eaed4f5b2c754d854547377f44bc383","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.9-20180821160132","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-W2Q+rQkPccO0+X2XLksfO7Uv+Ipo7UfSGK981Mm2XkCELV4W+9ln3+3mdIP3/Ho9B8tAC28LOSDW3UUOJYjk5A==","shasum":"8d665e05203363ac447bac2242f3d4b356fa0a5e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9-20180821160132.tgz","fileCount":349,"unpackedSize":1074389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfDfyCRA9TVsSAnZWagAAe64P/jgrn31IZNjwJwgu860+\nGn7ZlukksiyaUjIDE/wmY+J0lQog7fPkRdSie/7WFr+sTaQsp8QEz9Ln0ihL\nFz+KE20Jtj+7+IMBAxKObYB3z4u4LnaVRfFbiXbn/ryPQc2hK0mBX+0WdJzy\nLL2aiGaWIgXwHCv9cMGqGD0Ov0sDrekPMtvW4kAzeutBWh0CdixLniYrbtc/\n1pZODJ+KWVlzRlycJ5aEjTDUlnlBF9LBz9CES8GH+rhTEqAtxrLSz1Zx5SSP\nlkPVPB4i2gqs260S6omW+6tQc51gPEJUnufjJLotEbbqoE1Npdl82Jn0KzE3\nA2oaE8zw451CwpFDCZtA+0YQB2mwRevS8t0d67myCunxggppbweIDKH0UpBJ\nvw4M6fr3HlD9hBJeJwcPHvJnCA+JWXCxtK9Uj9QAxQLcDw/cZwzKOfQX/HYr\n2MFqj986wRug9GR1nrh5LOiaG5SZLVms49U3UBUbM3s6aNuGwIXXOXm/w7Di\n81Xnn1RoaHWW26WcqObesJPR4jSdrWr+ZFJ6pUyLvv6mLvWUbtI8GFxR0gPB\ndV2KbyN2CNKLBYmkwd1rmOcvg26Mb+WOVM9ft2bL4PKsP7K01nrMBk6IVnhO\nXcBeV4NpUkyrpNEB/C+AZ/93wdDVaOAS1Z++wBxcjxvvOcy+1KnAm3l37vb8\nozWI\r\n=fBFJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWndctYpv48FkikF6es5V8oY9YcGYGHzn9i894khR8KQIhAKrvO76lha99NiEFrnN1pSRgAg0vvDukWRVYeNI+BCSX"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9-20180821160132_1534867441660_0.9799783880648627"},"_hasShrinkwrap":false},"0.1.9":{"name":"@atomist/sdm-local","version":"0.1.9","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"db09debb5eaed4f5b2c754d854547377f44bc383","_id":"@atomist/sdm-local@0.1.9","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-tpyQmeHuv5axm4nc2X0V3yXxs553P7a/4tCBvtFi+R9QenRHaiW2LmdogM88DgXdjUJMzRmoiTez33WwNO3Rmw==","shasum":"21c37cdae5ff7a5d8b5ce576ff9d292361c67700","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.9.tgz","fileCount":349,"unpackedSize":1074374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfDkqCRA9TVsSAnZWagAAEkMQAIBkz+7hx27OF6eAWqJu\nMyA7o/ew0znENBBkZCg8AORl2JxnDygUxxycnRzLGz8vrPv+xJJlVGi6VBPf\nA/NgNS/EtD19hAF/H32zTyP2dExMqFoqd86tU010FLKItyOK8Cb5jxitL700\nMAtguJ3aZm8ozQrP/IUp5rPyfscFfASFHqiTZD5t0KjnlA98XA0fWsj63Hqm\n6SNhyePoGB9wg5rR78mT/OxWCEVo7bP3YmzbzK9fTpoYvvyndKvlvS+VZ3hV\niE2sRaCNaG5PkRRfItt6ELEt35sqCZGQV+EhjUjZen0N0xAJsECxqtqrroC2\nVHPyJ4OnksmIPlg7dYxTHsvlUzVNoq45vLPBl9JkV4Rxrv56qXIn2A8EqHs8\n3cLtdKNteRa/bICrrzWDq7hwgJ3Z0YPYFZHPdwdF779RLXm+ionOA1Empk6f\nYI5nJ9b6CxrIc/GJYtSxvekQZHSAe4XXJdA4eVcLQF4xHz5tq7xjfOzMCjzG\neH2QPKN6Fi2G9eyXhBBD5hIRJ81vjYTjzMkMhQZVByKcTfXdz8d4RbWUe6tQ\nwSX7pNe5AFid62mFFLvfzSmXe897vkNHaza1btyBvfEHRmlGuEMU5cjxkKM4\noD1cCVaUE9JfD4S/9zuUhRLC2YHsr9BmIeUmYhGlSOUPzScb93T/Yle7/pVr\n3rSn\r\n=/0fB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzI9HNGX1sgQ0UkXCw60zCMhqhy07UVNBSlsQ/eZTcbgIhAKW/yluVLuXCpvmWt27u05G5MmKKV+VpNNvcrIMTVx9I"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.9_1534867753871_0.3263479820099955"},"_hasShrinkwrap":false},"0.1.10-20180821161016":{"name":"@atomist/sdm-local","version":"0.1.10-20180821161016","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"26c4d05565c4a5d24820a86438bbf1d2162c5314","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.10-20180821161016","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-TYMltfNglR70z/8k3/73DqkCNbkF67RxNdiiIjxTD8sj9DKF6nSRxt2Ah3U0DOUybdkLp5RlYoUUQFaNT7aE8g==","shasum":"23988837ad37c50fab7402dc37911eef5f6ea8fe","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10-20180821161016.tgz","fileCount":349,"unpackedSize":1074469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfDnxCRA9TVsSAnZWagAADpAP/jVuBSYrDwT45KxkuHQB\nq/TZ2KdJjFrlBvggMUf4TKV/V4e493p0jKeHlTrUa8MwdWUKaUj/Y/NUkNMB\n5LSJ+YiBCLs55idzwexZ2wuqRk+tXC4pKlx1U8WJmi4wUSY+ZM5VZhmC0418\nxkCg+OGYCjLsGt9ndvmoJlshcEBrozsRtikup/vEERDdHhpB65jlcfBSQTqr\naido7qdbI+p3hniH2FdoEq3zwdAWFAWLvVL7uHJjD4R1tO7NLKfWRFO1dp/2\nStxEEDX/V2if5tLUV3+pG+PTkJU/l/VUoQpCJTfVzEKO+wrtxZ9oxeORwFIH\nRpUwtS6yobMGqatzw2Z9bolERCCdPhq54Q+CCqZySbdowRzDvFxVPQP8ZPN2\nUTPxP7I/dZ7qXZCyjzuoVKvQWVUgAdLpYvXz0u3g7BH/c/+OG3APLelHM97Z\n5krntUYGZSa5HFbjs4tt9faZ62r/aF/m7nveD/DIMccBZpJIR4i7AEK0auSC\nrr8KdF61IJfiTew2wrz2yEfkMl0DCG+Idx6nmgsKIsPa1EPjMwfs19+6apl0\n8xsqo9pJ5Fz8dN3iXbMzk9dONRwp8DB0QTW/mqefGsTkTJDUbuaOAPZmdQB0\nTKi/gYx9mvlERZsOER/Q6z/TyJhwIorlEE1G2YSO++09Z7AiWkS5dfBBh1f9\n27Lq\r\n=1RdL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDD7InD3Atc3TVx0bV8Ov6zKc16SJGQUvarni3YK3xIHwIhAMKFnkF/18rE+9RjP+gwy+nZkKTBQIb4OudKvX48YsbN"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10-20180821161016_1534867953003_0.7355911311787167"},"_hasShrinkwrap":false},"0.1.10-20180821170454":{"name":"@atomist/sdm-local","version":"0.1.10-20180821170454","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"52c5320b3bd6ed79bd5647a87fbfad9e5caee2ff","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.10-20180821170454","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5W9nzBjv+aVXDXz1qUxflcOnGM/IRqSz6k6UamaP0X5XlZEylVw28iG7yRW6Agyr6/vA37eEXvzlQa31B7ME5g==","shasum":"6e55257a73646ed0aa5c3946539d8a1511558a33","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10-20180821170454.tgz","fileCount":349,"unpackedSize":1074544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfEapCRA9TVsSAnZWagAAnKMQAJA+oYD8PQC47C4XmY8A\nSKm2DYvOLKzOPyvdRyDIawcnzW7ETJG/hLHyq0TQQdl81aKYXYwYdhwRBjGj\nVhRjyQ4XuOZCBylUEf+M9DDzYbL50bQCrd9KoDqa2nNFDZvqXvh9IG7EsG07\nH0Xn3OrFBSsmcg9ziwfqMMxCRp2OxBOPh8MeyUYqjM5CAzavxIVBtGfRzPB1\nwC6OoQS51YB4Xy7oRnHMwQbI9oTr9kDETy23imygiUNFezfuUVoxvCCCQQJS\nGMPQvG13/xOkhCjIcGOpYF7/+B5CN+z4tLV/Jx79Rl9UIVIpuhrCdTcxi7Gs\n111U2/vEsCwnY/JyZCWiXR/g8qpK6AfkUNbHan+xp0SX4Z4Jc8eH3b9DKtl8\nTDmeFNSTqtiUArN9XqwSPN+WR/stp3bv2SBmsfUPhLW2lFjhdcgsgpr+EN05\n13G7gxo9TdsnOWa/6bZnjPQaTlcfL072EwOGMg9ex/1k0tDr4qMAe3uT/pIM\n0o8kBREptVEf2pDwEtGnCaMfuHygV0e8Zt21OnhLCYydCnTmIWPlS7mVKtSh\nhwvHDpdoJN6Cho1LE68X45OWdZRk6EK4d4gQPxQHIc9tQ7hkxkZq1haQ30Uu\nkSPLF48VY5UVdYRFD9L3N34fcyKF8qEnR4sRRN4xfsF1Cw9Q2sk0YKenTd1Z\na/Cl\r\n=via9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCu05F4Y6kkXOV5vAcDjoa615uf+RifuFS6f2RXTlHSywIgMmj/1kS3EbO4P0SCLJv9SJLuiFyvc/BR/BH8GQBs3qc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10-20180821170454_1534871209344_0.33853643634099573"},"_hasShrinkwrap":false},"0.1.10-20180821182135":{"name":"@atomist/sdm-local","version":"0.1.10-20180821182135","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"99f637792206514e700b622d018d45ccc55bb5da","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.10-20180821182135","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-nTbn/kDOE8kItxidZ4FgtSoO5atwc6sKfUBHqMsIBiFBxi+6PYWiZ2W93TvMDqhHawOqZZW4L0Uy2Yxt+vk0rg==","shasum":"bb90fdfef8885bcd1dbc65d72d32d29012b863a2","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10-20180821182135.tgz","fileCount":349,"unpackedSize":1074549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfFimCRA9TVsSAnZWagAA900P/1lEj1eC6WaBE5BABhTX\naAFjn0HshCrozK93VIfohCa3iVIRMkebSYFrc20HeY7+KdSckA6ktbvJUme+\nYqdVm1g7T+qSctv+q27aGDHgcFe2wthXsnJd/FFRZrgy1u4Ax8chVovSZrc1\nIHp2/tLvqp5E7vEaPnEBCfPdN0Rg0pzpDfaTLh59VgLmgQTRSq+wTQbeltH+\nt62wfEe+if5zCauAwid2dpdz7DGfxI97V2CbLnR6eSzAX2FLXbUuIfPNB+RN\nHkr63LoRW7NA+KLBjXwqARIngxl738UoLCcAmd/QUKlDqABrBGZ29LXsT6Tr\nDj/vQBgqWgkikql0HNsadke7QWyyFjEAiR29qUYiMN41iTOZnq6dj0WyOMf6\n3cDc7vEIgDbr06MxgbwlfR2nj8zK6VCnqRrsmQPxLM/SouO123JPbnbvi53y\nUbcMtTlsoP4Fiusohik+x27ds8d0/JM9O24st7xb1C+MptXRtlhshwSbdEky\ne7MVBa6OrH8+mx3icUIIkdfZi5W0SOKBWiBjs+lOaHfK/vQVL6eMXcFeFAwJ\nCU34oB4VvCJFy/pEWOdHunMRMV7gzhTKkazG+y7CzTAnVZFQq95iKAi3WtLH\nEgNBADX0CXnjbYuBf1ZKkRl8HMlpPF0h2y/DiDTKZp4u3QJVf14pmonY9x/G\nu7mO\r\n=s9mG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHlu89tFtFBQM/zHLla8P2qYhXWZ+FGjViGIsFbv9YAoAiEAuyurCspHcJIjOKYoOiOi6tTPY3Mpd2RBZ9mUQ+ezWsk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10-20180821182135_1534875813635_0.10284278808867375"},"_hasShrinkwrap":false},"0.1.10-20180821185332":{"name":"@atomist/sdm-local","version":"0.1.10-20180821185332","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"c4384cf722b37349a2172de54cacd518a7e36b44","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.10-20180821185332","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-33Z0UyY7SyhkQu2WKQdpGU2ruLp5ej6BAQYCrUDnNGOnf3cfee1zsviX9vnSRJY6lOemDwdD8qmsAYGURbgB4w==","shasum":"089dad0ff0caba5f8fe352c22bab687f41ad7f0c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10-20180821185332.tgz","fileCount":349,"unpackedSize":1074515,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfGAdCRA9TVsSAnZWagAAyvUP/2xgNPh6pxAP8EY5OGOV\narURlD/be4l3KFkqQH+BMYJDAm15ceYhXRnBUu8BsmISgaOa6jZyFk46MgKa\nMn5y/eHOuOWLcPBB1pMWQptvQIahtcX/HJfjibjRWvZXrc2/m89LZJcC1o7M\nOWXljx+qxhSYgbbgAoJtQeIXeWh+xCAPd0fx0am1tBWQjG2evgrN7gXFGHog\niXNeZG/jR7EM+mUGbem8R0Q80Lupp16QIAHrSFtyhNC45Lgcbt0PD/NKEaxc\nJFGOCui87neDpVU7c/xJ1fpkU57x0xlWF8eFVlbBWqmvGVHeO8z7EZ7Z1lxp\nwTZPhBMSmr1kumAVwsVG59Vvhx1Z/PrKvcqCN0sHV2U7gAVD1tcokqFJTzQW\nF+gVwDpCP9yrOCs/tntHCLgeoqmEQR47H/nIQJeZe/SrK6VwXodZSmR021x2\nHh6c+Hp16Z8a6WFjibCL+3GSZXvUAR7jxG6DuRyr9z23zKEtbfBI2imHvvPx\nkYd7hEelWuYzywwWQU6EpVulKOD6d5wDn4ej+9kFQ1TvFVPhlUpal/AwlX09\nO/ErjaIJ3hnuUKQFFkCkp/grxW8Hy8CtKEHe7+CN8R42iiKJuJgun6zQyASp\n7IFXRwcwQurjtdYUBa68omcyA3//eTwkL1dheWopX869TBEPFls45h1KVwEI\njYfP\r\n=yWCv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCT+qU27dOf4XZ+H1tPmYT+Gjf7PeR00H05ze0ehxXFawIgKf/BY1T6Ewg7y2ci+FbpuzBj5TLhrbG8hAqE7hFOogU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10-20180821185332_1534877724275_0.1708226728350244"},"_hasShrinkwrap":false},"0.1.10-nortissej.limit-markdown.20180821191345":{"name":"@atomist/sdm-local","version":"0.1.10-nortissej.limit-markdown.20180821191345","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"56c8e12547533fc99899c3b05240f16fa12820de","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.10-nortissej.limit-markdown.20180821191345","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ta7vxynQHXtIp1SQnErxhcfg/cj8OlgJRKNFOXQKH2O41uI1MuT0g38TechckQPz9H0cCMXVnLPj5ze3ePH/GQ==","shasum":"303650b2dfd2db15488cc86546c51b8684047683","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10-nortissej.limit-markdown.20180821191345.tgz","fileCount":349,"unpackedSize":1075409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfGTaCRA9TVsSAnZWagAAcVcP/1YgaMIXgt+R81HjjanD\nEhqdsz2QiuEiuxH53FgZFBa9rt87wzeEZti7dPSMid/2bRmzvIrbJRtQjbrj\nO6ZbtR3ZAAQCTUftLLX1dAC0iPLrdtNm3iJQtCGGZGMdlqzY3+Vqp5O3gsYw\n6i2DFVrtQ8LHY8HjyHwmIC3Hj3eNz9ACJB4fAoiaikd1bVQcsJkJDpjRmM4p\n2ddQ//z4zJs0EbRVyvPdOACSdlEYTj6Z4Dini7jRip2L+F0AFEvT/FoW4rjS\nbZXvSKMmf8rge5wqHqh6E17sXLDWJRReURswmdX11YsSxd39Ir4mQ9nYygTK\nFPm9sXZjHvrO7UIuTTXMv1Q1VZU9WqDfic77Wm7xXSWD30ZncgYY909jCKXp\npiuPUrl2l/Zn1vT1SPHKEOmF48ZH/q/A1vds6nHr7CesOptCBi8EWVo08c5v\nIR/vP4rJFIVW5UN3sWydFp/6xsSnGFhDfU86tTgSVL5yy6aOkKBLs2EeWER9\ncdzplVfaPyFDvbS+zPAj+MUo/tnACYUWr15F18xc9ivGWkic1oYCGJPLDTid\njbIu00Ldu/2MXst7KTcu8cqpQXSn61SeYdPNRBYegcQyEkDulciAKm741WIu\nEMKCGJ3n2rpwIcuHb/tbX/KBGEKydjd056INIcfEjZOG802Du4DiZcI1yWA8\nYRHL\r\n=g0bM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/+Ezqn9LPKlpPWWJtNnB9fi3QrmufCF9OcwrGe0waYAIhAO7+dZF42IGbVpC+rm3EEhPSFgB8TIHWLmEcPItgLWOi"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10-nortissej.limit-markdown.20180821191345_1534878937977_0.29679912179825196"},"_hasShrinkwrap":false},"0.1.10-20180821193415":{"name":"@atomist/sdm-local","version":"0.1.10-20180821193415","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"abb44227c389bdb0e7a675d4dd282184d476b245","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.10-20180821193415","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6hkL5UYoVM12+AH4fX5dOAr3MxsdMf9/BV6rQC4LM6P1UD9T7mbasK4IjP7VsRzvvbvQl4EWnMmdnUuLR3I7AA==","shasum":"30ec26109cacade27a044bf46659b04f6fe0e887","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10-20180821193415.tgz","fileCount":349,"unpackedSize":1075355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfGmpCRA9TVsSAnZWagAAHkwP/1E1RVeYJBuZutA7AIgm\n0JUUqJr7frBr7F55IC8kCucfsPwnD356F55F0OAHrvJw92RtllW/P4u4AUfT\no1Bz4XEPbbe+5BIJpEBGWvIOtJx050z2sbV7FDaBBTqD5Ivrlpf6NBNCcbcM\nzvhAj3CmAvmmFLSMMV9zU/HNd+4r418PuNzGD/V5QmjEKEb/2jP6hv/TmijA\nDJkgRI/u4x6dAfAcrTOXwq2OU9oyTITYGzfszuPrAJrHFauGw4E/Av6iffqT\natHzyN7O+LSMcPjB/hNw+6KwwQ42cy3nEOU5J/mR7sNJkGGvPiBiUNWYkg3l\nj6K5zYWzjDw6OBqX5Hyh8mW6L7eRwBVBjYxRiyEG3li1plsqvnYuvYCRLwoq\nbp9qwzeoxOPrk9tmI1ZtK7+Cal6GfBrXO22jDq+qyHCjBTehsIQOe5PRYR84\nRZm7YTdfl+6159xEMCfcsnSSfqUFQ2jGNkJWUkKeVvArcJUVgIfKmP5wUbZV\nHZYJ49V79c7tvIoJOsCrs1dabl0wHiGOE+S515N3509QURrLucfo2nM2a+6/\n88YBUJk7YczjM4/WtsMkDqm/M4JnxwhPmKhwqgn1VwwpRIOb1CiDnHY/w19m\nsXRdy6vUzVLE1eCFuJLKmx58QWfJ82SyHEE2Szcx4L36YVysRNo1zuhNvDKZ\nokbD\r\n=dakv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIArl3osTdNk1mdDrn2O9GkH8P39NZMVbErmOPbd0KSteAiAhQCs9oQPvKT62H1iVZAQ+0nWmnHbvbPqHQudH1fdQHw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10-20180821193415_1534880168829_0.41094671634554136"},"_hasShrinkwrap":false},"0.1.10-20180821200948":{"name":"@atomist/sdm-local","version":"0.1.10-20180821200948","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b2961d972a1d83c54b7f92940c7811c14302fd7c","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.10-20180821200948","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-7CH78xuez3WKAtoPYx4Ih0MkAy9X1yJbU9v3UZz6JmbWWBtBbuzSmzAo+6j585XoZeyc2DI3QYGXISNdDgDm3A==","shasum":"b48eac7c26ccab28b765c4e07eb7b4247d8a9674","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10-20180821200948.tgz","fileCount":349,"unpackedSize":1077196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfHILCRA9TVsSAnZWagAAmFwP/2DJB/IPbpM6SCuO/ite\nJHNbqkncVsJYrWLs8cqgv9lD9TdvUuFX9+mDbnXj9+f5VS8X/pH5tXd/mVQT\nYHiJTByxO8nTjP1QhqilZlyrRmwHxaHc4H/bq1hz4JcL7pLMnVa2gWOxkiWV\nVA4CMu8f8LzjmcBcdwE6HhFe/mEG6nDN65jo7ssyhYCli8EU2ffweDPahq7j\n6P/tJk1u7of9Xg+mrP0DCvo3sNGMNNLgJcJJVzZuWL5pbTA+Ktu2FAovq+WG\nMMnu70h9ZGbXypdjY9klZk87QG01AMr3CBFRnNURrtuEscfLKac5qbBisaBo\npT8Vo0T+EHWGBpD68v0neo8eri5lntuACAauIEeowUIF8GrNKyZf+YadJkVK\nK6BXAFsolzOu3QVXRWl9DJZ1heAUxVgJcMryE/aPQ1LEKxyLbwfk2kXXjmtv\n2CB7XBTs6cIwRNwUTKm3NsHBtQNZMxqpI/OjLoEPLlUMCkXNbtq2x/VQRV70\nAkspGuh6931NyQkFt5Pe0bP36ja+yN6Qc0lExmS5FO+3Fu0snHs1Ro41I2c6\npa74KEirBChVNclRQpI2vWeijOM34zKoAtQbOZcn/c6GqKlWOSnD/0Jgn+go\nyOuAwlX+EJ8MLv322fUVZ3oQnMFsJ6nO6kRIHDs0AxdMVzNj0eDMIxMau0Rm\nWWqK\r\n=1l6J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHhhK6zhTTPpp8XGNAzPkOHsXd9nIwTmGD3jUsU7ApDBAiEAomQwexzyoL/g1M3VHSryqHeG2+DEaxGNb4wpg78jzac="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10-20180821200948_1534882314474_0.7027982055450934"},"_hasShrinkwrap":false},"0.1.10-20180821203658":{"name":"@atomist/sdm-local","version":"0.1.10-20180821203658","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"ab43a4a2b14c491beda8d0164b0d444c015c1ba8","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.10-20180821203658","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-SOJb1Tnw6r8XCP/se0g2RjKtPXdUWF4tkZO/HA1u3G2z++8xDuMSvYET7GikjleppEUq5x6hN5cIcrocl804cQ==","shasum":"55d5e486a8089be2f25522a536561afb0df65889","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10-20180821203658.tgz","fileCount":349,"unpackedSize":1077450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfHhuCRA9TVsSAnZWagAAsyEP/i5Yli/crVN8cIJ0LZTd\nkDZCturt/cub2x5p3iJkpMyh5NlR+mhb+jFw5dzTckdYjF19l9yPivqjD8q4\nNyU++qffNmC0mOCrZEj54j3aq3ZHQ9oexEpjdA3ppeX9KTqd8m/BOVzFjJe/\noyNkiR2EmSkDyQhFZ4/o2JBQDSWalQailK1DOxkqtxDLNi5Gm6of3e3zrZ7i\nGy9ffHFuxYPsk8E31QqDiooPvdHoEvGm1he8dSe1jHRqzsqVAA4B1dBS0XpI\nkzow92QlcVNtnBEYDJzYnmTvLNS1xb2zz8y/2z2bq1aDgRu0f3FjeC7lNI8W\nx/IKxxWrLL2ANZodJkxCOxqyC7jlUruzVIbRz0GOpCIGuGjmq8anLXDTPaII\nUIsFamNInQ5wnwKhC2u/CL86MBa51IdL4+2jI9/jlONrfc5jiib6xKg6Fszi\nr0xu4fbwwjULbhVbu1uMoZXrGsKd5h+JgLlwxYp+rqgas3UTfIie10o33la1\ntlmogbwi3EAImk2MUyIJT0L0Elw9TVwesgbqxhrZz9nDQvgUPQv6GAHTOZMm\nx0wqGJ64Q+EGkNPtmvf4O9tW4RiAX5sVvavZcgwFyWBLE+W/Wny8lIWuyfef\n7j4ITJ3IJQ2hAhihtX54drc7xu5Yn8Fb4IOR+zD3HCUy7c2b+nc9DpJN1eV9\n9xOK\r\n=BP/h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC72QSRTjiXYoQcMCtc7pCcMfSYik3es0mX+a2QPKcClAIhAN+wWB5r6unFSuxwFZpxRGiFVCeJ7eGAZA0p+kJiL17N"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10-20180821203658_1534883949392_0.5707454113255572"},"_hasShrinkwrap":false},"0.1.10":{"name":"@atomist/sdm-local","version":"0.1.10","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"ab43a4a2b14c491beda8d0164b0d444c015c1ba8","_id":"@atomist/sdm-local@0.1.10","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-UWvbnYn2LoYj48E1UbQEzStHIFWBNEMqQyRONIQhphNqWuwTr0FKft2IX8lhmuvj8/d6MJDZZelHa8NsX5xE9w==","shasum":"f650338846464228ea6d6b27f7fd53d2344833df","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10.tgz","fileCount":349,"unpackedSize":1077435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfHjqCRA9TVsSAnZWagAAklgP/A65IJt1eRMD6cRPUAjy\n7Roz1jpx5OSPjC0pldg35F20TeSOKGh+uNjp3he50YPQDyMxbot3W63J7hlM\ntguOjkqNCS+qImcp28CnYv+c8AQAG7zSRO52qwXGPutKlTVs7JBbJCt1Nb19\n0Ko9uya95OpAEzhyJyqzsMCldpoZBTuu1pcN91mFrVZMC7AUUJj3lG7jSRRq\n59gVo0xX/jVEGfRp1gw9DUnFeDgndaUYSEwaYIxVRslnHAjyPT2G6jEOijvM\nHCh5s8MOmZLwgoRtkVguCa9YhvQvt4qAeuNQ1a8f4SDXn7pcBW1xd8rntJyX\noJH1GWTPltWCFNM6kSmiPrtBmf3CnHswh+zHc9BUcHUsZjzp9tJSPNuUdTGr\nvJBCZnS1LxruSR6GQBI4ihMSjVpyywq2kts99iPtwY5QxERN9LPtAcjPIFy8\nbe+shZQXR+kvTP39EU/+WR2OHbasYlIrNiabexQGuxRdUOlwwkBcD1o1IQm+\nb1COZC+xU937N7BZf1KV7CtrXfe7t0aIr9JFDtpI0zeq+WK1HiybQfe3ZdCE\nx4ul07/D6YsGCis+rCil48eEzBovg/WxSeu388BgbHvcEFLDa2dHtvLD9vn+\nsbUmxl22TUfFKruNHnepQlVdmRfNN3ckvAKZShKBBFN4c129BvwJ8Etd+WRh\nuvTz\r\n=4ufT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB2xqN2kV0i+NUyVO6gB/suJ3YdOnp1bE1xNEHPNYoK7AiASAtQu4bY3mIIham6RY0ZUXKgAiiN/wvRrUsY6ResgbA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10_1534884073569_0.24524159243032506"},"_hasShrinkwrap":false},"0.1.11-20180821204214":{"name":"@atomist/sdm-local","version":"0.1.11-20180821204214","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"3f2a8a375a4304969d7e6c72558f0663f0fd6663","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.11-20180821204214","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dw8qIQqgxFtr6y4jYWyR4NrlgGUqaUFtkRhCarkjCFW2j9hqcMKCDZvn2ULfe8spZYmbxoZ7u9p4lihVZ2z45Q==","shasum":"b04e6ffaec05d56eb8bb407c30c6a1d6c3b479c7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11-20180821204214.tgz","fileCount":349,"unpackedSize":1077532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfHmwCRA9TVsSAnZWagAAdcoP/3p6B81JGYS5ZvD28xKS\nturNFDQ7VRH/K93UM9z3wATFYNWR3fPc0WIJX5vJFU9AIPIVbAM3FyMrRbap\nwrwfdYHk5Kfav0vE2CH4T5Hr2Adezlu0Xq3ajsL9aKqssGxVUyfSgLomQQmf\n44XDeWbCsF3EwqWk6EACUYSFKSPkWM06G8blJr7zYbD0EmQyFIWtec1FComn\nBa0SktU7C2/wZha5ZgF0uyNTh6bBf/T9rTFZKM4LIuRHPjzuYrUzJzNyLSKG\nM53Ab+tAZdqhDuvZoh3R83dWlVBB/Pr8UPz1Ff6By4f27+8wBDIT6h7wgr83\n9DjaslSIAKcZI3xmUumXsmzCu6x7G5zBZ61UGypngixp3UnNE3/c2NjTZkHb\nVwF/63AA+J8CGpEGutkuwSk7o2YS9vmLctDShQ7NIYyO1/dLLtAIKWSyKCgM\nTYVfv2N6T8secaNLAu1YghIEMJinYbcv89Al0EwCtE0rXGhm1zQN2pY+6D8H\nPXZdGkn4zHS6+Y3VOr50SzOHuiAEr69I2ov6w4E1nHWFwd3jy/xS69fOubUY\nzKDLyk6DQ4sMYm/gQ3Kia1lE3Z4UMa2s/ePTff/B8+OB8WYs+yZRcuY83/dI\nD2O/Pnxm2z527ggv1M4b6kQ1oFcooUIUrsuj3DLL4pzAK7SbSrAra26RYoY5\n8s6Y\r\n=ipsj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFVxExCP38pFTWjHzMC8FICycwt5qBxdUsk5+H55ov53AiBu8Je5tZRX9EElhUeiGwIe+cVBulHavfMQTxc5sFst8Q=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11-20180821204214_1534884271864_0.37541018384378244"},"_hasShrinkwrap":false},"0.1.10-spring-delivery.20180821223755":{"name":"@atomist/sdm-local","version":"0.1.10-spring-delivery.20180821223755","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"8c1e88dc5cf9f24f0e0db3535e4fb059ec70d4a3","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.10-spring-delivery.20180821223755","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Rpij3eH1LRSb5x+IaHs/wrmggMlwiVtzANJYYa07IioIlxIHB/72MNfw0Qo4Vfm4Yxb0yi34Di2Rvk85Qvsb0Q==","shasum":"b48b22a66e87ff0dee56da394031e367f07fc5b8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.10-spring-delivery.20180821223755.tgz","fileCount":349,"unpackedSize":1082858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfJS3CRA9TVsSAnZWagAAmNQP+gJWkFKTNL+gzSxUupx3\nESVwKZ8gLfvB1Wf2O+thIGNpsgp4DqtpQxMMkatEWMeMVPJYJvCc8YgMCcQw\nTPfN5sMr06Vhios+7Oh4ta1jrBh7xvsH954cWm/n3guy8BARv0yAaTFMTLbP\nZMqHzGpNm0dtrSQPpvHjjiDv2qoNUYHpKm6alELS8w6JqMXD21P8yqTOvSP/\nx86AZXWL5B10lLHS5zqfrrBeEparppCgZ+F0/C/KpgJOrHCYwrL1Ycj/DmKj\nU107bW732Wv+zkMbmEy3lPTVlXYHnu9XkXPmE1lOzFKfaYHApa5LSJtFHK1G\nk1NXyzTyK4c+o/5NThVlbDfgDFbOWveWtDR2PxgbsSKyMJ5AZnspAclKiUQ6\neM7cDLrDqdtpASGuKFk4u0Pz/c9L80YEgTAow+lrS0rMT5hhvNhdGBs5NbWc\n3XgnuzdTD8X1WzzrFvLtovcRhtvR8N1shmfcEvArc906/yDyREWmjrKbgl3U\n3Aj0ajlmBHyHs+ejVhKxxPqHAbKWgfSGSlb2TAs5GOacfhJiPJqbDNGlhZ6p\nI3gw+1gz8jDPKF5mDFS2lantAYHJdVwsC6f7gv4p5s2O68+GcBetGLUJakQz\nrWP7Pd/BStVrWNY5244yLsa+Oh1AxTJK5xs6dnLAkbbJXS1mspnGCD8sXayA\n2D3/\r\n=zMZn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9GfMwObzHPkbunQ/4ajevM3YziZNq8nGlP7Dtf3ZMzgIhAIleZKesALCWKbQbLfyGICwtV881cPEE28/DlWpXrg28"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.10-spring-delivery.20180821223755_1534891191112_0.9629655344119763"},"_hasShrinkwrap":false},"0.1.11-20180821224120":{"name":"@atomist/sdm-local","version":"0.1.11-20180821224120","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"7bdcdb6d6ca3e977d47b04dfd6bc5858696538a0","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.11-20180821224120","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dkP5/ugJYuPu+GrOUESwYlTMZ24ko/gabWb1Nei+vwkCMJQbyg6DIckSa633ugHX+N3vYkly1fJdTzsObKnxNg==","shasum":"423cdc35656d1e92a0f4b2025453e0e18dc8e549","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11-20180821224120.tgz","fileCount":349,"unpackedSize":1079806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfJWACRA9TVsSAnZWagAAh/4P/iw86IgLTXyR2jkLikhJ\nEPbWvsxcRXgmGXdTKwLYQn+3PyOUshgQuYwOj2RqcrWWVp6lNxTXwmtSlnWM\nCQBb3TtDo6EnKVd7pTA/H/lMwpa7KrkAeVhW66j6HUHLrSvExKUNmb2i5iTD\nQkGMTTmYuhDZ1vRrP//vqA85KTF5dG73Fa4bab+UCGRzfrUB57IsQkvuQtCu\n9nEKYyPE651BQVqgcu79FQgZUKtYmjjBhf2HSWxAXuQ2W4zgGfrKp3chB36R\nzMGaLIvRTCXc3h+SP47CEkVQRb1LkPhQq/65PYeqauPKfii3URKbAiIq3pzB\nBB+KfwLyLqKkFFhGYqyiwLFJWMkI3S570en6W6mYeE1OWsttCAvXH5verTij\nNSDfVHKltM8szkKgeWpUY04n1/kL2cDiDefzWnqAfnSEDJI+dvwDw0OraR2A\nP+LTcFtZclF4aCHmz2gRqTFTZLBMFwkIDPQC25fNMVsGK10ktv+81TiRZODN\n9KiQn61R8CEaonxmXn5KtUAPWBTXixyP64VQ4Dk9New8ahjfidUmPwyvfMip\nT+xYapwTOem/F2x2dAe8U3YP10FgVdvTvpbHn49PMuNmPbQ/nHuVs6OzM5eV\nMVjO/6K06r/UDbiula3lBfUWFyXpyOulxjmUQtYLNSRurUKyKbiQRWauRtrQ\nRF5p\r\n=bWJN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/XSlMcd1/sg4OPuTM6cax/4WszMerIBgUF5pVb2BHxwIhAKNbxr93gmsdUzTuox+6qe3ctZYtXgJ5U/BsHTTaCldJ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11-20180821224120_1534891391550_0.3140350804238463"},"_hasShrinkwrap":false},"0.1.11-20180821224320":{"name":"@atomist/sdm-local","version":"0.1.11-20180821224320","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"7394fe31abb2d8ba5cab7da471c0235c19527735","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.11-20180821224320","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-wuHDCe9BYJJCjXFtco0FDtCYZI8P/G/JAzHYssTChpKYJEAgi1Cmu/iW6WuBXlVv9t6KHYnxdzjqDhTNbOepcA==","shasum":"191cbacbefac614b7881e6d32ced29140d80d3ed","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11-20180821224320.tgz","fileCount":349,"unpackedSize":1085198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfJX5CRA9TVsSAnZWagAAZFcP/0+KlUHnDia90hUhoTBW\nQiDkNnK02ceFeykqgGmxTWuVAHaY0ZElE0GewgVyK/xd+AXNJj1w23JqZf+L\nlroeof7QQ/TjlOhHil8EfY9aJzNDmf7gQmyn/LEiR5Yz4XLRRPhsKSPEFOT6\nuT9WNvG1nsLzXX+NAL1RzZGvRjaLKPbAV5WU2b98/gOmQad/GGp6lekAeIoH\nCIiqfoNAnPSlIV/Uy+x4hHws/4LVBA7YWaKuffLhE6eYLnL8XnsdfaoxPXSs\nQkqztjsdcHmq14CWER22+FyYGG0QMtS6v4fu67A8eHEJIiY6UWCtIhzfEADb\ndNitjFuprm9dommE9MA7hdS94Ng2IPUpxD/CaxEKIXOrlHUuAucTTYkU7xhz\nVen7Zy1yiD3xXTmuJZMfzF907TGq4rO0s5aZ1yWCBggmR6Yhu1yhnwirpVCj\nCKb/tKXBY6bGhAy8mS2DFasL48oUjIPg8yOlZikqZJM0oFac5vxliEZVTIU/\nw71rJKVdGb3PBtz+x68ss6RsNDRVxO7PTstJmupfaoko/yFKYdBCSbIuvD4t\nGtp7Q8LOIXgQ5aGkL7IZcIFCI03LYe47z9hlBe77BoSyOM0L649M/UuV5dR9\n1aAMbZ/Og+AeC96fkAJ4p/hGE5zav4lZXttkWDE+FCK7q5Vcwmd23UAl/DNF\nnSyD\r\n=OZge\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFgG3ehU+PmB6+OtLoeV5yaYnh5kYp6AkwwqnnOc08XtAiBSI4GefQeKmt0Z2U9NbjgUkMqWMaOplVcsNOKz5uMLYA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11-20180821224320_1534891511737_0.675093288637137"},"_hasShrinkwrap":false},"0.1.11-20180822025735":{"name":"@atomist/sdm-local","version":"0.1.11-20180822025735","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"a13f0f3ab691e1a0d3ab26a71ac67d39656c34aa","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.11-20180822025735","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ao/35kaPmTOguI60uN53LPc15w7ZDYjQnN7R1CZBy6BAHqaXxYG8iSP8g8ueGel97TN4bCzWcyxuRE8FBCHiWA==","shasum":"b598bb4b8ae32c4af8dd1371b3c8b77861e96af6","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11-20180822025735.tgz","fileCount":349,"unpackedSize":1085223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfNGXCRA9TVsSAnZWagAA4x4P/1Zl9AmhgQb2eZv8SBV9\n6satZdFbJAvyRWLO265JMd5yX9cu2r5Z30DWzj0C/8HxE00+1LmQkLEOV5Mh\nytRCquUMcD6G5AxM8NG45/kpAAbE20kUT+rhAhqqRdJTHZxjXT3plOmbdVTc\nGkJQ+SvPKMWr9Fl6Pgy1JSWGM9mKSlYTh+Zi9qqKhD3pZ91KA3VpSt5liCD9\nbn5hN1957BPwmy3XaRPkq0nnaSdiBl+HqvS5s/xcDrjJma+mqbxCg40uWm3P\nZBLMqVcPsMADsQDaxveLXLSOKwTZ1Vl/JJYGSYmittVWzfo4yJLHOt9/tEte\n0TJiH9G8cf+qpYXJIOhLV8HpS/3HDcZj7usgd21RGQcSX/aCNyTaeTZC7SEt\nsudZICzA2R2tFPsGTiq9F+C9jejJqqP2/EA5J+Vjh/NJN9H6R49FDqbJANYw\ntnFAfQa8SZcX7lpe8KV0shQelYLajfkYPx9VQt+Vj6lgA044yy1dvbao/ljN\nqxSgRjCGN6RCQXjjWoJXWm8G9y9n6tUdyP2G1L4gd0K9poKjCiqSEaGxDyUQ\nG1Faz1imWJokcB/XNOfSyzKKds7Y9pHunJcrAwkMFsjdTpE/lO68653Ota9Z\nVHkq9FZXfLBj7v3Cbkrixc04tt/g8sPeYV72yTaZoRseFeiUxa2UTkunGX7x\n6Dfz\r\n=dchW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoJ1GV27p3DPzwAbCvptpEZaOtbPAa2ffWGxFEaRui9gIgEGdEZpoAYqH5/lVeoXYgypr6TbSS7oQn+2LsoHnsUbo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11-20180822025735_1534906774572_0.050123079361907186"},"_hasShrinkwrap":false},"0.1.11-nortissej.local-action-form.20180822040317":{"name":"@atomist/sdm-local","version":"0.1.11-nortissej.local-action-form.20180822040317","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"9a6a4986dcb87a61425703920cf81aab176ea07d","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.11-nortissej.local-action-form.20180822040317","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ct5yI3MF0UZzjZBYk+XeWgAVaVQFrzCLMJTvRX4UlF0+FHYUir9n2zRM/TmorZorGUL7Ud4XIa1U8v3CWhesqw==","shasum":"07e5248ca46ceb24e4069a0830a69b2bc5a0ec09","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11-nortissej.local-action-form.20180822040317.tgz","fileCount":349,"unpackedSize":1085576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfOD9CRA9TVsSAnZWagAAWp4P/0W5kVgoxdqQvRPzxca5\nKjeL+TRdebFkcOO94Aid+rwWCCSHMWf2htdIF2R/a16TBAgfOlzvNntVZ2ya\n2PpoUWnDAzIOcVM2+B6etUJ8C5C13CPfFjazA3SlLa/LKYdwIrX+0PWnpVSH\nn6pJTDm7JP3+Ly0tTRF4kYJdZHdQdSHtMGCnyFofqCCbCKaUZ0IDWB9MYEnN\nquadQ+B6eF7V5ZZSOlv/zXL+CXDHHz5z3Uf6JfIYWilIANfI05i/w0HYv0g0\nqUduJ9SSqge0VTlToB0WYktMc1cVH9zrorFvPNffbOpqXmsO6o2u5pFssmf1\n13ONKn44DN+ML1cRmDzS2wamEko0Le213JzWdjHM6nuS50ULaHx4dQluit4X\n50gSI99CYft5Ega2JVdT9WpJBVeLuHsbAhIGJHEq3kdh8KLGu4SRroR47Hri\nlSDYnnrDEAMgKcmlU7i0CnI2UNa1O3me6QKZNFDKk27wDlc8tEBTeLvDx/k5\nEvQ9xeXyWzFZra36+JnfKjd2+Jne+J9YvooTpCz0a3mPxF+3+9UsWEiqgtfc\nrxBOMLpG1tmfXudEUTVMH8OIGTR32epi0RZR+Ip4AP+UwNNVRjIQLz7FrUeo\nAbDHoNSaKv6uVOg0S6MrKzuGrXjoWGdQ0Qf5jtQXJoTNBmYracQ6UBz7PoxK\npTxM\r\n=0uVz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKA8S9DPzhOQ2eGdxSdnAQOm0vcGciLZnp/7+PbThSZAIhAODuqRH+ZM3fCt0yZ3iWw4UylYSGqTMnwnbX2nGKGFl1"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11-nortissej.local-action-form.20180822040317_1534910716547_0.46357568545244665"},"_hasShrinkwrap":false},"0.1.11-20180822042916":{"name":"@atomist/sdm-local","version":"0.1.11-20180822042916","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"492ae11c4288adb5e6a5287541439f776b675c5f","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.11-20180822042916","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-eItPeocazCBJDbLd6NNbRozO9qw0kMaQwbS1soBIlBy9hgV2Mp8D2FipmHbMvMW8spYP5cf8W5R0oGk3/u7u4g==","shasum":"62da3f9a2e4b24a84ef73e119f33eef8bb791e37","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11-20180822042916.tgz","fileCount":349,"unpackedSize":1085548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfOcTCRA9TVsSAnZWagAAkZ4P/3wKKpI1HoeA8FxzC4Cm\nz+ftKczglVrEpCVguTf98NSBvRz1rnHSqR4yAB8rWAzLqNGwPgrHf39zxZsF\nS+gGpVConO78rR+CoonM3DbyR8xvhDTnQOcBTQRvbqBsLUFhki9PBOaKIKyx\niBhjK7sJebwhT2tOuPL8iZsdMX0n1Ddsn+PATAjdabDfJGv0NP62sFmiING/\nTHe3gltLxr5FCr51UEUgN40+CEQr/kF+EJtmKjy5XZXdz5ekCkNhV8izD7Eu\nwheXQ/4VzqWOA4aOLHyeaYMcdlyfsqhRL8dVWE5dVjJL/YCpRK0JUpYo/NUt\nM6p22qXJ8JsKhDVpX7sYfJIIddk0Fws2Ypo6F57nlang1TgOgKTvxSJuPZAu\nwn3/EY2VRqAT4n0Ex9pjXF4E1Oy7GmI02wvJsS6twuEAZCuM7qI04h85Ypro\n9kzWDR070h6X1ZVZd6UXmY2oYhdJvQwMjwEBIyO2jbe6dTpvM0N/70hrd62V\nBnawEdNKJV++okUr34V3V89pVNgio2eQ0piI/A1RKnkTtQKCzy/w8QyD7vcn\n3PVv24RoXD5SRzuQxlQr/9e2csrPsCjiULZbPhHc91HQ4AeOEnlFGzERtOpt\nSXr2xizTS/LT9ZZFOdRCEeQMup7yYITbChiQRt9bMiRQ4K1habt/zBa5UMU/\nx3vS\r\n=3dSs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAiaXVtmhXL3/0WBAbrXGhKo0oVnrHF6sGZBkuZnkxOuAiEA0RIP4cvPB5Nc2rCBO5D5vc7ddis6opH9J1vZUn9vaT4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11-20180822042916_1534912274829_0.16392144176945433"},"_hasShrinkwrap":false},"0.1.11-20180822044618":{"name":"@atomist/sdm-local","version":"0.1.11-20180822044618","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"2ddb22fb15fb6bbfdeca48639f6c3daa3160b444","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.11-20180822044618","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Z7gkwAAdUofAJWQhyNjPk4cU84U2VbsYKHDmFIGGl3YlaQ9laOPc29MEt99fG0GKpDbk2AO0EvrMmO0gODwKiA==","shasum":"46f07b224e3555699edc33a021d923729ab98faa","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11-20180822044618.tgz","fileCount":349,"unpackedSize":1086799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfOsOCRA9TVsSAnZWagAAMAsP/jXz/p8eLWgZ40wxxNeM\n4Ldpaliv3IkRlJ2NvcKtIi+PnEIcEUxOEf+C6309BkVDVUtjwawY0XDM1gey\nxQW1BlEaNAOjGSHpJsFsJarxpYnw1N5upTSrc4+bwQYbyfwxWTFUl0bCmE1p\n+3msTYycEnYQMZ0BcCbeAMYaILFFqUNvHlCMO+BXZPLQmKY1s/Cui8PrQOcZ\nroDvpYN3S4bhyQpCXGZf0kPBppNb/LsjdIwOnAhZf8unl3OLn+/I7qxtilIK\nqVC0wk6fkIPd1zo85XsHSJD/I2xekj7A+6Dsl3cxndJsOTsy4lmgDqjSp/55\n8wLvE7U4YRgO2vwyD+wLnuQtVlS/bGeXPKAaBdSFKagwCEagABn+cw3rLzpr\nkBefzLA9GHguj3bNXFeXw8wbvv1Ezqk8mAYbN5Q+oUa6cWcxpYa7obERGLHp\nyjMEpspG9LCGn3joFPrV50BeeOt4zLZE6+uDzC2ZIDjgH6MalUVyFQITTW4B\n0emScR08iQwsUVndHXHdvBBXDn3d1W5hUSbClhaZjIQU/0AFXIhymWWjE18a\nggDmgtCylnfjeNYM3PWNQl0dzfiyq9Wz1O+dy0JNTB9zIC2GLWHu64VJQC8H\nVFK48c2q6BTDmb6ICpTNzduuEU1pVzpN33nGEoiAK9O1+uY7PwNdo3nPUBMt\nFKsV\r\n=ew3y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC9HaauxbpVyfTrqfx/l3zu1HTqYX8xlhy0wX8wQcvFNAiBXe88VZe7gxYOr2HliBhRhlnF5/8Hpe6ofWkWDLqCLBA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11-20180822044618_1534913294204_0.8925479434079813"},"_hasShrinkwrap":false},"0.1.11-20180822045405":{"name":"@atomist/sdm-local","version":"0.1.11-20180822045405","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"5ee3d77ad47b43622395de77ba1b15b8ba824396","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.11-20180822045405","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-WIGVimNhLxv+BVDSHistvrDw06xtBqwZCtoFcmxZz44O+GCZ3Xp10qsDO0wG80Ch4WC/nioDyz1OV2pKXu4Uzw==","shasum":"0c17ef87c93139d5bf7539f53554252222905083","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11-20180822045405.tgz","fileCount":349,"unpackedSize":1087071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfOzmCRA9TVsSAnZWagAAnOMP/3NpTj2DzPYsghdIinxU\n5L1oc6aoVCqyqkdjvCKb/it7apHPUo7IEy2GDIFC8xKNcYqKL2rJNyRNhnXY\n609tC9oxc1Zm0vYciRZrDP58x4c9/9LOkH5TAybxMMiwBrY8RAm91BQ3qFSI\n5zoULj7wvXW9M8jstRRf1klihA66lnZM+et+CBVzqB2l4ecDRqilxzQDAmsa\nPr26hS/sd4atrFLnXY4PLzntfsBuxUk2r/VdIHPAvqH83WaIAjfP+YXAD/yE\n58yZpr+k4f9XXbgTV54fl0XdfcPEaF7xL44nNaJ/EL3+vJTtc2Nw/2a4KHvI\nRw1oZSQUPx7MKakVxWU1AixYxUsnd2t9NeFndMJ3L++SXDKUvZnfXBVbbgt/\nv52S/aEjZ9nJsrp8A3dRNz8ope83OuM1ZxUcFF8fKaBuF6AZKUvo1TjebQNX\n6acd6FZ6i4RtxWEfJP0ginA7ebmLFLdwAFey3MLngmwJH1VJjLz34ah1GBue\niMSDInJOUpwGdwNeDs19DTTAVcGSsp73PE/wWqm4hmd+su1b9kErOviIn7xu\nDRc8PgpnJ6acycPM7Kii6JwOy+L6j3UUwHyX7a9ljyPlXzqhNivlZBOs7QP4\npO+QUeV/Hsjm58sMasAHIPY986/vUjrN0I7Qp5YClR4IT0JzdaJ2m67DfFzm\nTcma\r\n=xQFT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGLAzbtTlrbK3Rfa3+5cUAKHqIdFeWRMwRaqU0mBKUV5AiEAxreIdvClOLuJhTUJlJXS2bPM/5Z6QaIhrW0vmd+JEug="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11-20180822045405_1534913765915_0.25545820122108553"},"_hasShrinkwrap":false},"0.1.11":{"name":"@atomist/sdm-local","version":"0.1.11","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"5ee3d77ad47b43622395de77ba1b15b8ba824396","_id":"@atomist/sdm-local@0.1.11","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-CL3l2SoojVTSCPsK8gNApie4vOhOp4DFJiXSEuSSkhFnHQEqZl61gvKyxTk740KL8LL/jt/G44gBGm2gIi4wyw==","shasum":"7997c8a4b5955ce870e6c70b89e6ae1a51866174","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11.tgz","fileCount":349,"unpackedSize":1087056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfYAlCRA9TVsSAnZWagAAungP/1QGz4peMo4lwnsJ/hRb\n0Td/skWy6JkQXV7P9UZe44/mxoYDRiW72eBoQy3DiwS4mm+N071Hts9SaOZ6\nMR85YLt490gWc22e+6JDTdTL2uK8Y9uMw0usYBfw2Jt4zlgv9LHszw53ETRl\n1vj9zT9sCirqnj7Xv8SM4LOsNcsoM1nGnAZUrVLqTkfiNl+cnLgP8ZSzdsjY\njuVcYpdllg7vDPUtYp6K2u5mg5ju9YUDG+KRNOn/oXC8btrPerHyAdoxwRGD\nTYY9/XVTDSFTGzEcxxF6wvvCF+GVVZiEnKPK6nYN5RO6qQ1FAQMZGlIUGGDn\nGSTYEQ1/ok+nJq5OXc5/x1qZ3f4EYSJTUvwEJ5X3DUK6L/LT+xm8utxiVR2e\ndpryKO26PHCago1ZSbizsNayEwuK3S1AGBQ8S8XuR8KyRfFSQGYDa8g/Pyqz\nUK+aCDUOkpqX2UyFxbf31ZngW96q4Un6G4aNUME3NutT+CWn7M/WNtdFdwpF\nqe7Qxf3TqksiTShIM1wVf5oEnVc0e6vKeEnvnWSibJdd5cM6pNNRVxQ0VWEr\nduEEm6ydHqbOAP2A8Bn9b3Ii5HR9R+ikvDVWcGJnmR0BB31N5oUgxc63pxhi\nxivVPs7MiH9S3u5bJGWykic+bXOgMYBrmJDhCggKv7qPl7abyLxfG5fSfT0t\n70f6\r\n=5Jr1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYxpUzW5Evg4T1BeDw5yP7HxeJANhr7+e0NRJvMRF2wgIgVIJEwuW3MWe4YqKfPpkLtWG3jotjjpUf6AGBVEgBGp0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11_1534951460419_0.08135124500022872"},"_hasShrinkwrap":false},"0.1.12-20180822152520":{"name":"@atomist/sdm-local","version":"0.1.12-20180822152520","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.18.0","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"1a60be87b186c341adc94dcf8e58dd261efb2033","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.12-20180822152520","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-MRX5R1LwkEKhP/HeU77w616ZU1QNzE82Xu+hQ5msUmi0WhUOQyyrrdCLJHkRnxyBUSumsHYbeSB9v0fReqUTNQ==","shasum":"4fd8dab2880c537ab607302d89a219fb28a7728b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.12-20180822152520.tgz","fileCount":349,"unpackedSize":1087153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfYDVCRA9TVsSAnZWagAA7mgP/RG/Gq/GtOIIpsdiUOCN\nOB8Fv1TmU/edt4HWY8FXPByxJ0zgcS0aJJX8l6rpzwIN6sZzfH6aTNa5eCV5\njMhrwstg3ZLJ+mHgQ+Gbc13+e6Vw9hKtGORGput5AWpM+U0XMqcaT6kRT7J9\nEcRLlYs47C+RGpKR32C9VimL80pBWHCRrGDtKZAzuCLH5gG06QAZO69/bSpe\nGvHLOkwkL1BcIglkgrybTwEvtJNcTopmY8ZreND9V5za7pHwydhguJeViBZW\nqRlxIa08p+Ugh2LV6CZiHOGemrH0Wg+vd6B7Wmr7pDdiHDJLKyxNspvxZH2a\nduS0pdQbzAaKYaeL9EBiECD+of2QP+N/f3Q1JbFsSLAgH1xUjc+QvmzyV7u/\nOOEIm2o1CHMq5SpNJBT2QwCrY9BnP6X5J4hgmBoUZ2JpBEq7nxst/j2dlLdb\nVVP+H0H2oJ5i7mcZg1NUYCCRDvtLhYyhkf3j46k789dpFisXjGEHCnC/WEml\nJQn4fUwoxdAm7CmM87pnpG3Xm18pKQLf9owXLke1uWoR+npslhfJd5yDK/p8\nLjXQSbBF+1puztS5XQQ28EkSfsTwmEdRPEhtbfqELb5A3we8XtjfYioq7OTg\nK+xcnwo3/znJT/UY26oR+mzRIkDkpdYzL5GrPtDfQyBU7hogyPgaXgsxYUgM\n3z2T\r\n=aY4b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE7uAdP99Tkbdsci35Z1NC8EmR1bYuRrF9sUzzMkCxuoAiBfvF21swAYiTc2+ipMBZL8eUrywUaSRLNvnETTf5QOxA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.12-20180822152520_1534951636611_0.3260284811097318"},"_hasShrinkwrap":false},"0.1.11-nortissej.axios-next.20180822153840":{"name":"@atomist/sdm-local","version":"0.1.11-nortissej.axios-next.20180822153840","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"33dba5fc473dacbb752c4eb197d7fce616df0ef9","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.11-nortissej.axios-next.20180822153840","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-/HAiG8H2KKmkjYCcU7Njsd3ul0FAUFnzdVmcLl8xR/X/eXXXMXtT8Lp8Xpdw+BTx2lupoFVMA4ifJ4nfZIb8Vw==","shasum":"8a49b430d9991961b4c673cb5b0a6a74c7afad09","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.11-nortissej.axios-next.20180822153840.tgz","fileCount":349,"unpackedSize":1087106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfYP4CRA9TVsSAnZWagAAz14P/Rez/B4xP5rWUhTkLcoj\n5xuiHtCEAkWhWTJrwzVPPgRT5kEyCsXsdWOq6SKUCTMpOKHmn1rfdyyze7sp\nsHDR7WNh8qDC5RmWjUfo/t5p854hzvH4BE0lSIiV2mxbPvRmrmYFBqYzC2Ey\nF9INqioNBLSXXX+xEkyCNAMSnRhD9clSmgl7Igh38cm0wJACYw42FbK69nTK\nCf4laskjS3AeN6UlQk4nP98mqgz86IJD9tuOSinVjUEY6RiP0bFT6rtbexph\nkfxqQI9dpRVhuPfVOdWkGk2HRyXk+fk/NFG+wN8pyAlkwH8i1gZow9/3M4HW\ns0qo496gsExYjEpOGFNlx6suD6ygNRILn9o8lsbHhGPLizD7YivOjb0Bw8vs\noQAfgdFZeT8PDsKU+HJm8lV300RS87TPbtXtgZE1FLY0kaP3WpvgeILtmJk+\nIY0dEoXobPlbfFbH1Nv+RznaRTxtdo/WwTCYYzRNxURENflnmH5aEEZckDG3\neylnHQau30D8xlC9TuQplB3nbZ9Q6FF64hUo0FGtNWRLxccI61MRlgvAABU9\nWdwmca6fZEmETrzz7r+X+croMTUr8GE1jugT8fFLp6DMkUcgCaSLU3K6AktH\nTTocMIByQ5LzFZWHShcGerff3JMPuM3Ks1U2q/0bkMqShUwbZ49UnuftqScR\nFeZK\r\n=d9so\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDlZW6KHX//PJ71+RFaqI1CCWtVKLrM0niOdr7jEvE8AiBw/y5Qa7K5hrUARIgL+W/aJMzdazY5f7UrP3pmqWDpaA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.11-nortissej.axios-next.20180822153840_1534952439401_0.7757062275668216"},"_hasShrinkwrap":false},"0.1.12-20180822154146":{"name":"@atomist/sdm-local","version":"0.1.12-20180822154146","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"f2f5717d47332044a5b16df240dab84cfd9f9626","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.12-20180822154146","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-QsXehc91phdi8MbtFiSOK6ASG5KFbXHfWPdS8YNrF1yEjZZgGz2GI3fOga5E5UjcBuy48wQvV/DhecmGlUf7Lw==","shasum":"52d6033e9930aa07afb8f8b023015438b1b766bb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.12-20180822154146.tgz","fileCount":349,"unpackedSize":1087167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfYS1CRA9TVsSAnZWagAAv0oP/jEdHLvNJYiamGpSYBup\nOIUhjCR3x8hrezxMOaqE3ixQFRnUplhk1JdcaTWfnNJ4Ahr4k2szXm3uJhHW\nxl45tyl5VxPJ+FMC5+8xxa/gW1lluwd6m59TsMRsmfce2aJTt/eKcUTjiFkf\n0frPNCxlwAMZyrEZaD8DVjf0CQmZsCmKYycOKrEcUbZEKMR+O2mDmoxetHw3\nNdv11GgNpRi15raZNnMq0//cPUw4ZPDqPY3Ns/Miw5Sa0DTVJAC6wlnYybyO\nKLks8oLQzm4VpcPZ3AWY2+b0g2Rpl2P22AU6HHq2ZfKfXXYYtXolFiUtXvJS\nEbkkNCPoiNanInkT/5r5AWDSHeKDO3rx2XBkqhTXWlVq7YyLAQPJALylkz48\nAZDn2Wdz++KJXGjAsbLNwzR2UBjNVgOxjDlFYWU/yhwdj0Y9P79ZWiqfHrfF\nJD9GquAlRGaJtFi9PhSknCk4OFVjHHvmE2LKNsnMsZ4sqMiF0ARqlaB+xoaA\nUe1zw0OlFipmBfylZXiJMzX+dAPf7XCcJ78GdGDlLKmnSgDv18GDJ+2P2NmR\nHTpWy+3xeaFLJhzHfI1DSyTrW1f88Qdtg3+U8O4kCePMjYwdkQkpoieDbDgj\nQI5g+aBiphr3AYBnrRNK2IZdmKusXYuCpO9x+pAcYVcho2OWFFcipCHDRQhT\nRlkV\r\n=rKGd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRQtt2xmVbyrac0LGoVtf9fsf0AUkcEackycOAIJuDlQIhANNvbsduV1OoUBzwYXsTIl6AqIpBurnrRw/INmnYW7EL"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.12-20180822154146_1534952629091_0.477687946242803"},"_hasShrinkwrap":false},"0.1.12-130.20180823042537":{"name":"@atomist/sdm-local","version":"0.1.12-130.20180823042537","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"e551fb1f7718d8324172ebb7cca1399e1baddd07","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.12-130.20180823042537","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-hA8kknZ29s4r/lAovynxt1XfFlfMTa4eIjM0/49izabrv+z0AjbF57nTspIbI2tjfxnAywiz3KmFJj+hLL8JAw==","shasum":"0ca54fac7fe1f70c8b53e1ee94e8ba391899f40c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.12-130.20180823042537.tgz","fileCount":349,"unpackedSize":1093410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfjeyCRA9TVsSAnZWagAA1yUP/iapoEEiTKJiejrQ9vpY\nfoGbNbDUQkCLc6HDT6jxf3/y3H9BquDzK1B6he0G3Fl4FFhh0RmwtGZJuagT\nwcOMZHzB1saHGbuPMwlNBw3y+TGtrD3Zs7kVDhjaSh0M6CftlNxGBz1esl5W\n7oOlS1U4499zAk3/HOV88IKHPKggd9mZ/jmrLoKpu/9xfn/PzL1m4cSLYM4S\n60F66f1EtV62i120RMeWihCY+l46Laa/fbh1UNzBwWgi0UbDz9Q0Y0oHbK6O\nUcJkNwwJGzmazzoBfSKRtj4BNGaNOIkd1gUt4dImHWc01XetMXSJ6PWMcXac\nNDtueLDl1TFvj0v6uMuzw92pQ8vlTd7vSoUpI7QDxlMMDVSawtt6p4mpCYMf\n1Vg5u1SJ5+OnB5ODgEHzR2WiYbk3xj3FymGWjqsfPQpaM0dGGVqUCcCoGZlA\nWJt6R60r93aIOfTifd75FmTxYMR2pwZz1UcM/cJsWJX6DbR1IdNchz1lW7N5\nMjFEUtbMbBwzEqDhWOBFa9XbcQFLFZS8NwqhNv4k/+ygLuNIXGr/NbUDN9yS\ncCJUMsyjBpX9f8NSI9zfd7tGCPacT5yrBmqZZXrwlakq6kHtGJkMELaQNkDZ\n1MSlg8oLttMRI7jBDJ4Ct6OJpDv8vyxcoBM/dLbL8VHsT5xgEVuYZSMHU4AO\neR1K\r\n=OLTV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuj0bvwLzHuOnueCR3sSV1dUxxaDEYAPSBwtzEaApcWQIhAKAlEZBeFkdfrrdh5y7ZQqFc5yCj3gzb8MVANglNM11Y"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.12-130.20180823042537_1534998449345_0.6754331274361185"},"_hasShrinkwrap":false},"0.1.12-20180823042659":{"name":"@atomist/sdm-local","version":"0.1.12-20180823042659","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"a71e728a37266acfba59c1fb70b6462552773233","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.12-20180823042659","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-TKUpWcBw830MQMaK0g+sJFkCs87euOnef8qyEkEvseNgeoAB0QRghlt/9ZFBnO+2aKz3axYzPbpTO/njQ1fCqA==","shasum":"00517d88644733f8c31db41e3198aed65e866663","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.12-20180823042659.tgz","fileCount":349,"unpackedSize":1093406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfjgFCRA9TVsSAnZWagAA+OkP/1wQynuhpkPSDOhbTzWg\ne0qYGET0c/8QBUaJewXVC1Bu9FwiLbiM4DTrn+vr9l6NPvR/RoNLuNq5b2MT\nV2Y0f4PFLjfUS7bobhHeXYKYQuReatj3rgp7WW86Kqr19E87qZVyxTbs8L/3\nxGf2g6lmpn/c8fGPi61MDkKnKSgSBnl6KxmE6xeUHSAThyNy3XeX57vc899d\nuU1SPJj/4hXqkTyjbtPEy1KPfJJmyH94DZ3OYZFWR3PWVVr0o0iBq459Ddtr\nRXRjZsv0e8s1BXPAoeRHHeoqoMaD5Pn9Bvyy1W0A1bphQH1uzMhsu1DAFLjy\ndVx5cFt4qilN4vZaWWkyWQiz7CTxwZgsu0f0bbiIvg8EHgpYqQRum1pRBPIf\nGOFKPxqcRGbQD71RCN20UPyEdTyy8Lvh6YN2covMrGGSNy5/vjXnDJ8stGmC\n+QcEa5fPowc9JcSN7mDArXBqQ8u9P1iLe2ieMFsRD6ssVPjsJLzVtE3rpJUW\nHP2i745m/Pu7cHLRxi2J9AsOMG4VHPitV1Y5dIctBSgiXtyCE6TT1u2ZLZPO\nddTJBhrLBIEoSXoaxSwCjjSijnGeG7UPZry7+znycXuaFjAf58MV4gp4rzam\nk/yRY+U3ciZHHi0lmYN3FeGU3fxZ8bpUyzjjK9JoIbxDMMIIEs6yTq2vQGJ+\noc/2\r\n=d5/q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGr9wOFEzSzBhVIlhk57I3uNUWSfYUyZCQaqpNXj2x1SAiEA/1/JxWqmDxcQgnH8ZQ4hVielel+nP/Mi4RVNOIrS3iA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.12-20180823042659_1534998532755_0.05525784373161269"},"_hasShrinkwrap":false},"0.1.12-20180823044730":{"name":"@atomist/sdm-local","version":"0.1.12-20180823044730","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b796da30fb3692875da8ebbaec91dbfd1240868c","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.12-20180823044730","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-XEUDQWUmH9jR78pL0c2P/lHvy0rXP5VmHbBJAeuYdlH63Q1EXmdZD7A+mPajB90PtrMYiE/Z1OJlDLDH7D6eyQ==","shasum":"e715604b9ab7dc3616a5da6e1890f83cc81b0028","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.12-20180823044730.tgz","fileCount":349,"unpackedSize":1093484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfjzjCRA9TVsSAnZWagAAEhcP/0X1ZFRmQ2OS6x/ChCSb\n1nHRS86L+oYadny/VJA7YmTTgBbJfTqsNdj+SsWC45n32PdSkNTqBYUYAllU\nKdf+3BkKe1Ap2dJFHWRqNc7jBASsMzzqZw7m4d0Sl1XEdDMre9+cA7Zb6eTs\nB2T9TWpyAJRnnmcxqZ4DtPTjKRDfTuuf4HRlOirXcUbw8W7W7S6fU636Pmiw\nIpzsGHOsEqa0ustzLZPZS579ELmpIaZIV8crgnoETIUMAPFJEgYG3NrR7wwA\na/dfVcUJeK8Bw8nzSHW74yH6WdbkvVQbg6Q9YnGibRRElyaFl/JZdmjxr9ub\n/7hy5DckCXECuT4DXjfMxfH4s+B8VhXtQWu7xqFG903Hzq3h56Xvd9346BOU\nI5sP3ypb4oqghetIwLtw+Tx2J/ve+ffdew+LuPZvMdS1uX/NdSxyv402WO5t\nMfB44jmg3gNjtCEcIoYspurIlebas7aWxgYYxdEHBoPkL14pRUSVh0RJ1esy\ncV/k+TRCdVKLe6XyIf6jcTjaGPqvMOGhBYKZiWpk0BMnoNv6Lwz1nQDKT4Hy\ndKkIv5Px0FYLBPHhYVOnFvcUF0ja9SiySmtTEU99vLgPWsBwFLNA3tE9LH6m\n8RBNKNqqYWHYEbQa8yWjy3fdhvyQGzcHZ8oKM1CsazKubO/vMIMSvIXrgMaG\nlk1o\r\n=Bp8b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHKxBiqg0aS7rAVu2RZskH9htNuO2UlTJewiFNLIY38EAiBSQqY2knqWexROOI5wgEDvIdR4liXu8SWeWw1sJ3TYIA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.12-20180823044730_1534999778792_0.5151150531017192"},"_hasShrinkwrap":false},"0.1.12-20180823104406":{"name":"@atomist/sdm-local","version":"0.1.12-20180823104406","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"f3f6be37f6f577c474c78d53756444b6a6dc6813","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.12-20180823104406","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-AzJOtRQ7rmjXdjcNNndsqCxuCA+FI1I2aWXSH9jYfsR2LwlfmL7HGSKJCwsIcJo8pgbNFsfFbu90Xn6Rx+vfuA==","shasum":"cabded23a7a5311c9cf86038bbe2b513514b3561","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.12-20180823104406.tgz","fileCount":349,"unpackedSize":1170098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfpB2CRA9TVsSAnZWagAAQhQQAJCzbqIATnqHhrnLj7Ge\nROzsxEWiphEqbjRez+iIUROZhwD9OiNaeaFSX6zorpqDUi/pI+L9BOaW+gLm\nxyQV/g4yVgVvFui3eM9/vmgmDMWaV4+WQrsbGKf6tLPwEM1HBfKYqRwJ9gN/\nOvS/FCYSa1JX69BCUUQ6vTVLYC4JnKsB4ZpN7Ri1jKSoF5c75WZBc4Pe8Icv\nYteftieIEN5+mqmkGHpMrHX4XN6FiHsstDpEJy3H3mjQFnOFi1YLM2jZi5he\njO0A4yJX+VG1ULf2cQc54p4SE1a0yMo+A+x2adpxo3FqOPW3RVuM2WH+E7cv\ntnIE6kNShPoZm/O/U2pwjuEV3RblWtTBoViZa/XER5Uo5vXdXX1rkeYedWqq\nHBk/ttjBYtKfuUazg8MV3u91GmoTzbLB00B9NGwSTGPvE62S8kKa++aQOSCK\naXnEStydT2bYV0TiBXcxcUCapWhhMKI1h7w7DHkJ1B9lDnuERzwVKOapdHiv\nTVjv/vRKSQvTN4Lmpa5Tq4B7G20Q0GnR0xG6jVXdXo4Xyb3NQx82ykYuW8tV\nvAwx9zjwJ9Br5UEYTSLRZZ3it764HxgGpORJIvmort9SpQ844sIZomvjDRj0\nbjcUo6jJEnqokDnQSDspsaH3mUZTg2C0OxL81EsEzinHXlBIrvYNxfB4ykVA\n0IYs\r\n=2PUU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICzzbeqWVH2m+/O6294jHYTxleASjrG5KMPEiJKPSU5iAiAeGmbNjM4oQ/fjkSPbQjY7lyCTzZUPyRJ/sq/+eTzTNg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.12-20180823104406_1535021173823_0.36188720947704955"},"_hasShrinkwrap":false},"0.1.12":{"name":"@atomist/sdm-local","version":"0.1.12","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"f3f6be37f6f577c474c78d53756444b6a6dc6813","_id":"@atomist/sdm-local@0.1.12","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-MCw/ffzqif+gUVnJ4qdQx9Zpk3cEp3BPGT702zvx1/wWXb43PqGF2dn62Liimn/1aEkobjANcn+jzKvyTvCD1Q==","shasum":"8b0dac4fee060de7651ff563d627dd8b62bd2baa","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.12.tgz","fileCount":349,"unpackedSize":1170083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfpHDCRA9TVsSAnZWagAA+MAQAJMGshML3qOhAv69qRof\nnsAKY4Y0c1SQOCSzs9utRlVuTg+sF9WrVGXPKbx7p2xCwJki+vjlEEPlo8sK\nQHhar9fUnU9W9LsYhWr6VXIqYSBFjn4TG1gWJ0r4FTounWP2VoFb/jlOPbly\nTIZkUU7Omv2C6i1QK/D9q/inOJNoQlWZbsBgCnMcpjjK/LtT88loWOyifwW0\niEXnQiOqef0d4KRbDlsOvC9wJgB9/kux2iRvV9q7HCA2RRgQ9yC+GAu561ea\n23EzPjaLqgv0g5+yPrcCN+8vZfmVtM4lfRWhTOmui/i1eh9Z012wiEBFW0v8\nsxkmH2EZXrGb2eC5R8G7Mg7V74nsQ1MgmYgOYFm52gW8Y/fDHrwGG0GjqvJe\n/+T6koqMAq+MZhA4Vn6sEbjkXM6ZrCwn3gMgJa0Kja6HoSwby8mT8RzdULng\n22wSiG0Py4dIQPHdrUX8yloSuqZWj1RpZWfti5CKtvCt/XPC/27UV1MD4H+X\nxzmQAnBFo5Xh7uMae/ZdKgU2gH3e8DkCcr12JzbTIyyuLDWl+D9Z7ChsNd0w\nz9qs0m4PaX4kDi1Yqp+nwA0z8YyJxESUUSWlZz7SRu+35JVJOI8/X2J4q9Ow\nbbaOwDCcn92f/B/5npUrhUrVmFu0lIb/Mqe0h1IUUwIkvmDjLE/oh82tZtin\nD+Jh\r\n=XaKn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgJonG3JL9YV+jZYMdaT7jGG5/bJzSpcFbnvyBz9GrDAiA5JjZH0rDLk2qBW4eQNwHJAlAFOmaRpmh4q7k5eh6Asw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.12_1535021506574_0.5329268577601365"},"_hasShrinkwrap":false},"0.1.13-20180823105246":{"name":"@atomist/sdm-local","version":"0.1.13-20180823105246","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"637dc3db55ba320e3050ed816c739899255161b1","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.13-20180823105246","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-HX8DwIGM3iehJkTNFup+2o/Roc829XdXJPg07UIgupE+VvH04Q4W4RQxj+5APrMNh4WVqGDSmufJMrmYMzKOvA==","shasum":"0303d5444597973759b0f4167a82613caafaeb12","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.13-20180823105246.tgz","fileCount":349,"unpackedSize":1170180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfpKKCRA9TVsSAnZWagAATisP/2AP2ZOCkEwQuqZbOIe1\n3O/NII8nLmIaybo2K2xbaSyq7uvOaZ/PNdFaOUfXJoLpY9U1QFJdmoH2c0RI\nXhMtN9tDh53wsSz4G9nlm9KoyccTzKVQSzEqQfl9JVmUXyNsqAQnq+Q3L4AD\nqQGNXF2NPsc+BQheCWFeklBLVMbB2Eh3Mp5qoq2knJI8v388Fflr+4QE5y7Y\njuamOEhUDosNxqpbOKlF750TlA4PgjMYIm0XnwF5/Ik0qBaIESCGbOQatEdb\nVnJ+1raJbs0LwRtmoV1IxO7WiJOb12pX9UdsSBEUVujLu88kJ8L1Xo2g8bEM\ndBzGCZ8ZzGMNzwZ/lADx+xG4lSVQBTkEiSnyor6WxMUbNNC5ixmjE1khUM1b\nbwTBsBCaUdvYNBO+6bWl5Rs2x5eNcsQJaYdgma/Ict0mJX6ETALCHLhjJHc5\nvPPDUqTbNh3UOZmI8lCVDgNYZbZ0olYzEBc3U+vsm8cUKAS+eSYKDzrVR8/G\nsMUcyDY9Icp5PxQA2mWYGJCzIgkcNtlxSwjgGmOjfz7YduxkA1o5wjc6mOyG\nu2JJT9miWe1lWmi81LQP56/badqC3cPIeeCLK14WE4LnBG8O4BFayahTa0HZ\nR5IWi0iBESe+vOV9ARPVkAUlWkM55e9GbV9mIt9mt8xcA0PsZGoCceuDDCXl\nrkBd\r\n=B7ty\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOxYGKiV7a0LEy0QNB16w3h1OkEcpbeAY5MgOHZnE7SwIhALs+smel6XiSDoWNPZcncCG8xamty4gHyQ4huh3ZrzhH"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.13-20180823105246_1535021705559_0.29659273017342525"},"_hasShrinkwrap":false},"0.1.13-20180823110537":{"name":"@atomist/sdm-local","version":"0.1.13-20180823110537","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"ea635ec0e2bfcd26c3eb6959663be77b8f53e9de","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.13-20180823110537","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-FJGPhi2baIPjnc1Ue/LdkSzcIZ6jpzfqnsFq9iPp0zdL62wb7JYZXa2XTgCcasul0TLM3ztFBzw/A+ZUdmd2Mg==","shasum":"c0405f478b1e40dcb47b5bf627dd8d07d62f5025","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.13-20180823110537.tgz","fileCount":349,"unpackedSize":1170184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfpWDCRA9TVsSAnZWagAAmiAP/AtM5dLdL7xUYC5UmpgD\n57yBMuYV41iXW+ShtaTHEFfwac1Ss7EGsgcXI2iS+XDRHqzCmPxeKYCgeHnX\nidVVIa/nps5ywGl/VFqBtbLtAH2L+geQKioVxyr+/iD7CN4QRxtyDiXoyHVc\nBDo9GpjwzlSCDhaYwPWgRHAo/0p5i5F5ksyTihHO9JtL8UMM0zk0XXqZYJVz\nX2ekXA/L/L8SUz69FF0zmgaQt+zr2cNersdNuxbfm+dHNO2KcHfp1JCp4s1M\nBELAl7VPeRnFZ/7ZBDhOtBdERrTYuUPdKqfmcjt6XCjGL29o2eRG0vvCb3N+\nvi2KGE1nEupgYsAMzb6uIjrEab4OpjhQ/5H09HFTM2Ad6SRHH4LhGd/O/oTR\noplQUcAHw9jLxH5Ydr26HvkSPOMWUFvA2ifk1VIDwu09tN2QItFIqQMO/xhC\nTGNDYrQc7O4UX6GGrWVpPepwgQVZdROvTKMM6oGNIFmpLAg62WAQ30M0DRee\ndsiY5lZr85WdzHJi9AaZlyFyYoBlJ+tPWhUzW9hjD9JnbM/xLMFcT1N43D5M\nc9qSYjpHeE2xi/kHENyXIuaoz91H5B026m1nEphw8rvXCwWcCRqudfQJq+h3\nNrd6hPjUtBG32Qpf5MnCRHm4MeBtnzH9hztIs1wCuU5aYvgaB1zLYbcBbpwT\nxmXh\r\n=1a8R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXjgiiVIPRYahcB/SpIcWQ779IRjhT6bBE4tesD5EaAAiBEPQVtx0yMf3bahTd6fmYOghXHUUixQeaaGLW1I5Oxnw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.13-20180823110537_1535022466657_0.4488373913507546"},"_hasShrinkwrap":false},"0.1.13-rename-seed-projects.20180823122707":{"name":"@atomist/sdm-local","version":"0.1.13-rename-seed-projects.20180823122707","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"2bf24c3984fc63a779d9985f7438d8ceaf716aa2","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.13-rename-seed-projects.20180823122707","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ZiQ+sjTjiSr2kgSQ/lDwcRSt+ojHs/yiUdJlQVOX9bJBHQzUe6qV/k+C9z5conLBMENTySmocoGP0HBJS/ooiQ==","shasum":"aac133af46bde8fd943af77996620356a96f6523","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.13-rename-seed-projects.20180823122707.tgz","fileCount":349,"unpackedSize":1170321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfqjqCRA9TVsSAnZWagAANjsP/jnhJQVRV9ATz5wiU2zs\nNLc791ScPhJtecLlOiET75CHZH3KuznHnEB7RSh7R3uzMcZ33vv+4n7gruvZ\nkGm4mudb6rFsHKecuCoh2k27Q6FVXzOOYKnOysAf4ir54QLmGhWyik0b+zyZ\nSleUrWErkdqWRH+FV/p5b+iE9C3ZPedIT4PLNHMJlgs0hlm6aRFHmzovtSnJ\nx/lYN8L0cP6iQ40VTGvJ0LGksfSEEvgINStC8beDtyM9/cNccYd/x3dFZ5kp\nfveRQFLUbwMo3wkN4ruven5hi7G2MDIIisFbYfOXpBS2QLMTV4u60VpwyDXW\nmXgkfy+n4IIa8EEFrNTELNfL5SyT+9kQqGERbYIQN+HGC+Dfw+vKCSmJNseF\nMvHjyt8Fu1GEPExVdRoxSrwWehHGUfRjrxwebaye3NjrKj9ef7IpidO4Xd68\nLU/JDaiBRaMg/vsbtCPXp+Ynf8zY2R1XIo5tf9/PAV1jvn81/JkojOULmMRp\nk4/3E73wDQgz4qgVbHog9WaK0zXpuaydI8zlkoqM+4//xbN4A7UopRp+mBto\nySQoS9K+MGn7xvavefF8mPhviY2isTitnA9mv1XuTcQnH3lC4/44ZwNwvOT/\nWmAS+tG9/PN/MnurhRemeJuLuqlwqTKSyT1njC62JI4wyg5ez7DBvbgqLWUO\ntxeq\r\n=jtCb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAfSgMU9g/KZkx4IVBqKwjZefT4DlB9/VtYfh8FwnMJOAiEAm4Rq2W2YDQPM+9Gq6O+f0zambnjIhqq6OIOiPuhKycs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.13-rename-seed-projects.20180823122707_1535027433649_0.39140601748960346"},"_hasShrinkwrap":false},"0.1.13-20180823124105":{"name":"@atomist/sdm-local","version":"0.1.13-20180823124105","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"be9901d43da71901206f713b54a82fda509f999c","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.13-20180823124105","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-JiOpfWgO3SUwyCZ+mWBL7V2rbV6FsoXyPPHJ4QMSc/vyH5SGf9zFILemwkMGTxgTb22C/TY3r4p0PvApIav/aw==","shasum":"13a299d55c73585e7c0beb202e1d926d7fdb4244","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.13-20180823124105.tgz","fileCount":349,"unpackedSize":1170300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfqvnCRA9TVsSAnZWagAAja0QAJIipYOvHyIBIfHJyT2o\nj+IlC69qGf2obEzByatyDfHpm/ssOIsl4dec0enQLCOlSCvoCTolpWuLS4Cg\nIf+e8YKvTuDJTCBQcleGfNohGHbkweJeuWMNcfhYx2F/gofGc0oVt/uzT3KQ\ni90BMtM3yEeVDPRglLSD+r4FnCejup4zDR+bNBgR3Uc7AcpSymDcOR1BMLuN\nHsbhRGXIyS0rchgyssUbAut6Uri6KkGeNhLer67sqACazn0aQBgBn7LyPfnE\noZnyODYnYWfEfOsf9hb/sPumw+itgQG4nrTGxpcRv/uc5w5O7XPYeGN0j7l+\nawAigkyHuHKVKteyBn3nCuJHxzbwl+eZ5zyzpZJhaJRPw/pgoB70VOnld/66\n3yngUlRWMspmA0KEE2nBAbYPYAsM0IByfP1qHSBeVTifaninsR7VqrxekbO3\nXs/ljII9nta4dESIpzTHcRCTWoAReaK5J+G0qQ2jhMVP53u57km2WSw8ZpCw\nHu/bFetogR0Vt2xWcLJl8FaQ4q49fio6ruS1J7twsyfpCG31yszCpmaWjfb/\nD2YXV5wF6GruU9xPXZvBcpYEXYYjm/omlSumtGruUwlCd1noA/DpdDaL9HI+\nmyCKmshXfTst0PZ4gC35K/Ybb1tAk0e01aefv6SVKdGYVIK3hxfchlLW1YH6\n+FFd\r\n=Aey3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHZYg/ZDjX6ikUtt0fFJ/fexrappD2Xbsj88Rco90qZkAiArvhWopfYiAQk+1C6i/7iMIOEKHqBXr8AUyllO/1S/qg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.13-20180823124105_1535028198498_0.9972922067905994"},"_hasShrinkwrap":false},"0.1.13":{"name":"@atomist/sdm-local","version":"0.1.13","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"be9901d43da71901206f713b54a82fda509f999c","_id":"@atomist/sdm-local@0.1.13","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-SXIlEBAApZPdMOkpH2wEj1XNDzbv2Cco2SDUyb79+2jP5foDtPKBcUO8wXkAH2kstHEjmLIYXnTeCePCZY8fLQ==","shasum":"7aabc980585d9e008077193f19e3fffe45005e6b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.13.tgz","fileCount":349,"unpackedSize":1170285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfqx2CRA9TVsSAnZWagAAcNEP/2TgMo7EDxdvM1dd/nF9\nKAucYBzFGHwGHO7T1qS0sZjmeG9OezBF3HvwJSBhCcRCelGSOo5u1BXj5E/l\nvXQ39aRQDpnpgiuwYTv+YpaHUVU6oHR8paZlF3jzK757aJ2n/O2YQcdeTt8J\n9Y8BYIegkxgOdRdFQXIQF5Oh6/5HRaWJfByfXiNlxFZkimj3QKiYNVbG5ICg\nVYPcN93oLiYc4mYaOjOLvWJ/841RTQKjrJaMVzoXL1piLh6bqceS9cL6gYY7\nMC1w7lR41IUOh24QEx8l8CFyn7Hr8EDI3/NZ5Cu5qzq9NFrthkbeN7kVzZf1\nM7QRSGFxE4UdTEJZaGpS1BnsG7WXrmj9oQr2V5CPXBBY0QL8RvKEsxdXh21+\nuSUBqAcSnQ85q2yxoaVx+Wo/q8Oj2PbrxxSH7zzD6qig1cl13xx/MaNvL9/1\n7/tsfJiHUNUAS9DsYh6L3Lb/qUlaD1gwNv23TmpamlgkwvFY1RFKHeFhyVpe\n5fIRbMzrLmA1DsNOxoKHTaQ2AlGuWE+YHrB15WSO8c5H8Sg7dUYVsICsZ9Ql\nl7U3DUa+tNO9vAoQsZXCwEwAKtgUDgGQZkZsMSB0HUuMarMhgfC2znd7toLB\nP+kV0YBig+2Apg2x/Ash28z9Pkmk98Csved1pQIq6+bDDILsk7jeVLLBD/jp\nZ7Nh\r\n=zLgQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0LNuzKKN7yHNG6GhVs0aIgeABeoN56eJSoDGFv8n1hAIgTkoZy5WdTYUZTcHOKaRF2uLrc3/o3s7F7HoJnU3IhdA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.13_1535028342121_0.3782910801204009"},"_hasShrinkwrap":false},"0.1.14-20180823124637":{"name":"@atomist/sdm-local","version":"0.1.14-20180823124637","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.8.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.2","@atomist/sdm":"^0.4.3","@atomist/sdm-core":"^0.4.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"be92f9c17d3d08180f7c62befce099976cf11521","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.14-20180823124637","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-v/mAKqmoqdkEl+/TJyszgdLnmh7TxOz5pLhNYRNzCmNboXfNmtQgugmzNB2PYQi9xHECn/65/7lz3hSxoIUu5g==","shasum":"15726c38ab3386ffae0d3893cd7e9c97e184ad84","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.14-20180823124637.tgz","fileCount":349,"unpackedSize":1170382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfq0lCRA9TVsSAnZWagAAwCIP+wQ1H1OLsACptLhAcyE8\nzhkXGF12HViN7zkkZ+M7LW2SIKB3Fkx+ecwthUhYfpO9U+OxRqYgbM0wFMu+\nAiNXGPClG2+u87HEWp1hzYizkbcl20jLk1hgpmwJS0F9b2LSjrGBX7wPnY13\n9waQp3zF3kSkA4BuMAnyn4foZjjMgSPVxdBtVK/ovW4IFhKKvSlpkF34zJoN\nRef6SII9JcwpSouyPr15zq6mc7Ui5CuBM1IpXLTcNbE6t7ALEEbQ6pzSaoRA\nUXCaHTKnf65vd7d+DNzCmB+MHSmPJMw1/u/vz3Xc7KzVl3K54rc6WYMT7ZsF\nnjn+AoztrgiAbSSa6oS9FV7Wi7sex15/MPZtXX0XEeRYcErxKOxa9pyJigYC\nlahHGl4hMXIPTmsTNKRSIR5PaZzxFUgiIDTJAsk8FPnPO/OMgGR7HNlzMYIy\nR7FbNh2qZOa6YYJJgTDx47p/IbuiNVaL1XVLSWN/nez1dFdPluq4PRYOgsGg\nx0UuobySADzXe1VznXKDKBdmcrenfuCYzSa6ruf4pKL+wh0/itd2GYu6cwZq\nxYbip0wro05AY6f7dgKYC09kGhtvfSlcSTmQV4gYUix26NV3yPOzkSzBRtY7\nVbCgZ4beqqgoOfwFJeb+v+p2dZtqR9OfPvi+ZWyZja0lmEdD67g3ojSDCm4j\njTN2\r\n=1DTA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKPvtJTyUxAmI2CiJYSE2TtwPrkBr1jKPsMZKzDLB+PAIgC9ZGs/hzq9C1818qeherU9Ndi7+Yzn2hvRoPq7TwxtI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.14-20180823124637_1535028517329_0.6362012821301788"},"_hasShrinkwrap":false},"0.1.14-atomist-update-latest-1535090851236.20180824060737":{"name":"@atomist/sdm-local","version":"0.1.14-atomist-update-latest-1535090851236.20180824060737","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"afb1d2d1e0a0b9ca284c7319f43ba28e4e06c496","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.14-atomist-update-latest-1535090851236.20180824060737","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-NoSspeWRhuEB5ZEgmL/D3j2uJf6IHjASv7OAJovKqNBCarMioy/MITJRnUOKSkVSJrv2s+2Od11zSRODmvs6eg==","shasum":"b8fc792a9edcba8a214c0a6b1a0ec672a77a1951","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.14-atomist-update-latest-1535090851236.20180824060737.tgz","fileCount":349,"unpackedSize":1170418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbf6EZCRA9TVsSAnZWagAAEuAP/0X+ILrknF28HXaaElH7\nyq/CpkzdZZ9MnA/i+vMz7WcS7jAZWGoUFvuEp4R8JptMhzrJ72Zy5t620DqV\nHlep2LhTOFUd+atwOlUuAl5XCdECjVA+p/BHZ3n9BrFh2sXyWK7H1B23NPwT\nxbbFBabM94+bkkyrGzC2eRTTXMw8ao0igASLHoQ3GuZimet8xeh04IM3GubK\nCVF8gpTPrIYTGAsFAG3MP65qPvDdHMgzMNj9l+HVhUwHqrse+TUmqOGOLW5r\nokONVs2LK9LO3sx0uQfoQi0rwgxPGVZIvbfty9v5mNaJ5s9pYgxAdiAyF9Io\nyNzccS7Agyzi/CveAXImlb74N3z4NyaNDl41LudWdCcL0z5mAmAfya/EJc/j\nEEHf1VEYNcykeVVkBATlkJim8rQKKt71UjioGi0qRnboPtR1wPGYgEQ4eZ5k\nzQkPmqHOmEATKwlxymY2blLpQJeY9D0NQhxueDh4oorJ8NKNcdEagIk8XPNh\n5bkoPE6hNIJ/fJztOnqm4VyXYQO6nlT0s5HhQ/6UO/3URDl3zjuaVnkPaMok\noIId/xSgiWoXRA03XPM/8IVtT3qK7Q3B42bWsgd2hgq9ZzU14IMfxXmRe2kL\n+PlAIfhAPTJyBAbVNfD6UWFu9MwLsUROt912/3s7biAva5KiSK6VB5iDgDDE\nwDHf\r\n=LeLz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHwq2MGAT8Jp9rMgaH4dPChE4w8rTvTkKkmKyKsqRVv/AiBkxesVS7IbXa8mT2stUHX3iDr5pZzvej42lVYEg9TuPg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.14-atomist-update-latest-1535090851236.20180824060737_1535090969057_0.16735331489809124"},"_hasShrinkwrap":false},"0.1.14-20180824061559":{"name":"@atomist/sdm-local","version":"0.1.14-20180824061559","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"f8523d21c1f753caff43d4b13aedf2f10224d173","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.14-20180824061559","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ejrixawun+tQqSwABXvLwT2oq4rbr2FfzgdGaFlC6V5T76lpZlZZ7Wl79kdmman6+lYSiLD476Hj+2saagMBSA==","shasum":"a736d8812ae9b17f2fee28e7d56333a1581e5d26","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.14-20180824061559.tgz","fileCount":349,"unpackedSize":1170621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbf6MgCRA9TVsSAnZWagAANd8P/1zpgU/+Lf7H30Fb30mM\nvCvIo8mp4DSeG8PuE123ovm6S/phjhZCv7KXHQFrc085nwXylY1wbx5gFwNS\nFvp5TeVk3wtBak0XX08purMa20O5cxX5aWJzi2V/ayp/eVhf5UJcGn/d4hXz\n5vOy410MqZqvJc5P6LoG/k0RDlEWPa+7xli7TKis4NegclvLonaVvuHifBj6\nMAPhX8qJvxSkT/p+BmsbcAtC/FWxRMUJz83b7hA0jEYB4bDbfsBYo7MNq7V7\nPepTJfONRyAs1jlmhL0IMvdbSyuE3erMlpK41U/vIpZtlXKkANH5M0QYqZj4\nr7bdOZ94IyIwDxfAgW8Ic+K1OD5VTSMD86jUFyxZNfldpOZkcgab4Dlw/sem\nzpsx4pXPCHLqz3JUfic/fr4GSKj4JgLtSVfrVqTw92g7ok7djoa6/oUozFyw\nsVGGZgpKuYIQNmSzLc18XS9HtAdH3i7d2QJDnAP00mZKdlhH+CTL50784kXP\nnw0rO1R8Y9+VJKj5M/YWHXEddbPOaHfxWDUFFqfZJtG22RBRrgmFXOrxFzaY\nhz04HYATzE8J6RGmRlHnsEeBCIbOGtdOXk4m6Ri4h9Yrj+hEEkazabbSdeFq\nWEn9cWgifBkHbbiLpfYQSnKyA7ruvo1EGsrhPAIOiPTbAq1wWDg7kJJhsmmo\nUEU2\r\n=4nOf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDzuWb9D4j0WDqCZ+I9dMkBEIiHH3q3MhUNbCiErhGjzAiEAiAFVayf6u2HKY+KJBscgD3OtSn7OK7bSAVPHhtLn/3Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.14-20180824061559_1535091487451_0.7765380134602555"},"_hasShrinkwrap":false},"0.1.14":{"name":"@atomist/sdm-local","version":"0.1.14","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"f8523d21c1f753caff43d4b13aedf2f10224d173","_id":"@atomist/sdm-local@0.1.14","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-VPqsIXNCmqs/v+EzDA1E8A4Lm0emP+4cT2uJ3h+U1p0Yp4dEvdUwgn2IW4sfDApAC45L7Wj9B1bo00BARiFAWQ==","shasum":"6dc7c676d2d8d2f4077e3c10d7745b2031e5b238","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.14.tgz","fileCount":349,"unpackedSize":1170606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbf6ZgCRA9TVsSAnZWagAAnycP/1H3s12ufVg0i+kQrcyP\n6mAmPZP2uGtkulD5uAYwbhC3FVKVL7qgbSD2aIwdGNf1meqyWCisT+aBxUGo\nDQvY7iRDcQItY+L3zuuUG8HrQw27Uk+u/PTRjd2fDMg2//bad0nt7lnQv3BG\nU2NZ0opvBNWUGcoZaMB4I7KXdLfCq0qcHhnM1e4j6e3O8rkac1wCMKdapfNp\n+Vw0lxrrknaecAI3/1wIfVaisIIBtbf3QCX1lhR4a3kMH225+aAWX/XgT/2w\nzKUKT5EEDYrJdoIHtTntZ2AztTb20IS5gtSwx1WxtUFz94Zcl6K35nbc8l5x\n5scgatam0WmooY8VTHEElnuC3Qiw9xwWgVKv1ToDM+b9GXGo9/NEOWCG32AT\nr2qW9wMEk3VrzIF7rqyFDCf655o9zFoB9XPvWEf5NS5EcFCwLnVsWjvWuI6X\nM6FNKTFzAJXbIw2/N2iRI5PFFL6cTan4rR4iSBI6tmFYg4JTh9oeRKW1Bajc\nacdwEWElinUez1bq6J9JkyJD/hbIBqcJpBz2nX44HQd7KGdCsuLJ2EcjvLbq\n8d5nn7mKsQOILLqBX8/ixEW6jKmkuaGqfpU2XFferQAfzI2PmrzoPf5f3TVz\nSWJDWB4084sxBda4KHzlSA2q/KEEQyLktd7MPkec23MSK4DoF/ZmFn4i2MOq\nfMyx\r\n=/pYu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDblaxcpv3uFjM+xcHZ/8M9yptqxG6UxhKVWdKP+fSuoAiEA2FlSIIyUFO0rXVPhjDhjt+rMA1Fj4h+VnzmkdFIdCEc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.14_1535092319433_0.7021084587613551"},"_hasShrinkwrap":false},"0.1.15-20180824063252":{"name":"@atomist/sdm-local","version":"0.1.15-20180824063252","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"59b28b73fc585c28c36eaa57d9ded41fe131fc2a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-20180824063252","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-WhCKrOpL8o+aO0qwQqiVTMcmPTGwh3N1qVKoj/8ugrpuk4TE8+Str702vwbJptqI3F7/oTNYAOhLMJHbyoMGqg==","shasum":"4a435d6ba3857877d337e737835fc8c264ac79d9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-20180824063252.tgz","fileCount":349,"unpackedSize":1170703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbf6caCRA9TVsSAnZWagAA2/UP/3n8/ueZDEar3jI2dcLV\nIb6meN3/ac6hVymlLI+Hqzn4LrQ5iADeqMILxi60Y1e8ycVIa7cFzG5DE4tI\nD6HyEWpXmfyC7VX0Wol55BoYAidYUxHpgHt94/d59ZMbyksufolOsf0sCOOF\n3VGX+0hMtXmkxRIqvT9FIurBt5+YZaqIMDlX1uwhpmQwaY2FpW/Zj23sZLER\n2p4L9+POHzUJjiefl8RVKsK3hg9OeqXxgWrzvcTv8abCIDuzVDDAvaNKx17B\nSkkoYyLeuxf7yt0065LtrrN1/RciVPAlRsz7pW03xlAmsbyq+Rqe+VHGQi5g\nVsDRxrkLHoNdYIqfhjwG2swzXrYpn1TjxmIyb355tB2Kx3qWtt2uvFD26W/3\nbLzs6SI9zEk/RlWtPEnG3YRKg7bhgUbwGULYJ+4Bsmv+4Zf3D/z+5jA8x0tO\nwNedKe7a6JNw7S13fGnumjv3aCwFo3mkNd/h88DVdR2TchMwRyPrkgEXLYTj\nVN0/coiys8mogsj6lSWBdQtE6tmWan0EPKbb5JAJ+E20LohiLx3DjmPyqo1x\nEYn8oGnIGTzvNs9ceGFRSbYmfCMrNvduFt4aMSVrmtew5jatyG/ejs2dNUi0\nSr4tderNMZkFII/+nHs+b/pBnGfFxpJh0H4LvocM9LrB+r6EDwyqVXG3ngHe\nsTQy\r\n=LGJW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLb/09IPzjAnrkraOjKkSMmCJPr9uUTZDVkMEe0cTPYAiEAzgDfGujqg5jzb+TzDsoa2p0qAGtKo3IlT2iABhyBICw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-20180824063252_1535092506215_0.24659385599334782"},"_hasShrinkwrap":false},"0.1.15-20180824090321":{"name":"@atomist/sdm-local","version":"0.1.15-20180824090321","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"4285451f521540ca1d09c3961233e6ff4efde511","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-20180824090321","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-BzgeMgBxIGI5jH99FzgcsMquZg+HUChI6tEnQ0z39+E8bUMB25MogR5ZGS/0C9ku/n2QHFlwFmSHzcs+3xdFqg==","shasum":"19e74d4babf4002ec5f79a228c614dba9be6c2d2","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-20180824090321.tgz","fileCount":351,"unpackedSize":1176213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbf8pYCRA9TVsSAnZWagAAMFAP/Rli28Nsl0vbnvzRCGgz\nJskdY96EQa2U+sTwBGL1ucYnpdCIEM7ML3PL7JtaEHW4kJzh7sE6V5oWMD4y\nqUygtmiJtHW3CunYLtK6GrTaxj+4BWOtdiBlIcPHLolv4ssi1nOb+A95RpjV\nPqlwbtvPwRMdHLRsckZZJFass0yubdS4ouFD+ZKxmNPTI5ROuTw6jMD0Wu/t\nLcglmutGn91xHpGxvzcPoiuRF6nPmxJFx7VI77UxoDRBt/XmmYNhb2ytp4I7\nJx7YIyfuLfsm22iHop6NI6XZM2ylMdIzEmUGU+/ZQwi/argbvFAmmBJavzhN\nGRKgubXjUvVoPPZfId97fg8jZUXP7YDe9b8UjccvdnE3JEQM3HWglp8si1+z\nGUGnAEesxId7+plM8lFHei/zNwSgDGcuiTPsGtIQaBtNlV1f+88oYlzA//5P\n7P23+1GLh6dB2s1kKFZcQ9zRQ11GA5YZPs6V7LRgPClQjCjaeFgAyPsGylDi\nC12gxYM8YSJ10g9KwW9htoSV1G8YTet3Zse4vzOjQIKAhqoVE16zC83/c3I9\nus4rOIsQExx1PgHQwq+wfWysiyNPN0gZvaR9wm1EHQ12+7AGvLEDikLxDFrY\nqAon14vembWo8OXr0O7B5MSzqShh1IwEIqTztVqkVliLGHfrEt6FkUpro4pO\nyEjs\r\n=W58e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6s7J12h9QOqZ4sh0nacSrVKQCESOabhPB8zlObQjKxwIhAKPsaQ1Cm8Xi9X8i4s/1XfVTkV7LRL6UCbka0ks+ieyL"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-20180824090321_1535101527362_0.9425621395023323"},"_hasShrinkwrap":false},"0.1.15-20180824091441":{"name":"@atomist/sdm-local","version":"0.1.15-20180824091441","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"a937e5e3736a025d3c22da8bb6e0884c4a374fa0","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-20180824091441","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-u9LRuX3BFultTHz3xnhD8mFtzg9BHXN1e3KZhOgo3EIaLDDtSzmKhH9cWJ1rvYc0UWbJJ5OMcaa005NxNU4KNg==","shasum":"6f6ab319c42a64cddf39ccbb378354a09f4423cc","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-20180824091441.tgz","fileCount":351,"unpackedSize":1177908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbf80SCRA9TVsSAnZWagAAy9AP/3YdNYlQz03AUBaqBWqN\narxsSoEWgSWVw1VBs98B0CDGupA1Yn2Oksk2f4f94GQEOdy3/VzLB7S/aCA9\nSaR3MjwAxwd9cfeGmBJJmzrgPTpW9Aj003lcEfvyNV2DDNUyZKbf4Db0SWIp\nq384TmeQVGlj5bbBN8/U9aF6uAMJzH+McTISDaC8gDXAScmZK7roM7LIn+uu\nRhaJyTEY/kKibLXLHREjVV1mwBEsfDq9YJQoycwfBpCVnUVsV5EjZ14nLBGa\nFOUvTCMy5weKCqZPN356ofszfNyIx+FH/wMlS4ZExXvVM/oCdKmJ8GfiYdwi\n+dXJomBAR/LJo3ebQoEwaiqisA5wVjFS5XNIxdWsjmxPws+5uXEC9Cwg042S\nh533+tsgIBBJw92019e8RFVTQYFY3dcHaZfiF6LCinVyBfJJLfFWk1CgrRXJ\nTltO8P2iTNQgjdH92HlyBdyHryD8UevXC6JGFzFPbSFShHde0z1mJn1Kfmi6\nYKNc45OWoMwPWIWLkM7dqxiWQM2x87/ZHqPQvv5vuYVzEyoYwje6AZbXJWLf\nvImeDT/kFjtUv1cSoHHaTePyo4p3gqLpOJuqX273/uym7+kpZTGKnwez5R70\nUX+5E5oRWBM941Muep0U6Vu+ADHc8OKQiOMF9zERT+vNtkxcVFdMDqPD6w0v\n7Cno\r\n=h9u9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIACjf6jHWy8ekgsohIZnK7mxYGl67RHbCsCzf1thblwzAiBH3AqLMbYV4s2w/Dk5ky4CNbELMsMHCOlhQ9Woqrn1sg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-20180824091441_1535102225686_0.9580211800719352"},"_hasShrinkwrap":false},"0.1.15-20180824113229":{"name":"@atomist/sdm-local","version":"0.1.15-20180824113229","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"80fff14c41e236565ec3cee72511dc23362954de","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-20180824113229","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ErwiWfn38FQ5TzxMO+qvMxYWyQKLA9d0Lt7ltDbVL4ZCrywL3Y7+ttpzWLasYJJRW46+zf942tpyEzP2HUb9+Q==","shasum":"08fb361ae1f94223cf71974d0b260c8d619ac3ca","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-20180824113229.tgz","fileCount":352,"unpackedSize":1178035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbf+1JCRA9TVsSAnZWagAAKNAP/0zis39+6Id/XlXImUUO\nf8HdLUdoI2X7UyliE1Iq+62/1F8BvPFYOqGZ9bQ4/sRJaHwsTO87NpXakOhU\n8pChpHD5g6sblbSUYtbwPN3vao2npT778EJwxNY673y3gwafzei2efLQk041\nOAEJVpUpjQ6R9E4EFBqxQ847wBrvROxXKoA8dP/hg7a9iwf3rzgySItO+gS7\nJTTZUW1esH/lvINs8jkm6/MqhDAOKo05yOtXEjHZXuXIx88BoCsYNy4asDXh\nMLh/0yjPU0+KJ3cTlazGVXprE8qatrw8GKGNAfKeV3fTliYn9pzjiFoodaC3\nXdoQx/v6Xqw9raJ3hM+Bhubo/ErzgHk+ifJy+XIqzwVFoUqDcC1sCzXWstQQ\nAONGbVnCFmUbg/MU37RlgRzgjXJOVCNMwaAqVA14gkGSGmFkg/pPZxzsbaw5\nBcH15TxDDte4nEx3ZEBjA0tUPCCVt9/rOqsNvxP3/8jDBsq2qA2FNgg9S847\nniVus0bQHzQj9BILAAklxJRqXNz7IEtA0kpkDS/h1zKCxkOuibf7rCt2N0Ze\nDa9kk6Q5umG7PHD+FfIxplWtgsM/kuI3Kl/b5upQauXy8dcBsNAdCNpwS7Ra\nYHkAYomHb212iYPl3/grhIDX6pHX0hiC/tcOwJrjUazJ+mFsTkv13vpqGyT4\nHniu\r\n=Irdl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmihn+joDUxOMDvxWBFblvOp+wDOAt1+hUcP8QfatAjAIhALC/Z2qh9ZtEStBspUdEZeLKVyEojjwnpCrPD2+pwpZT"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-20180824113229_1535110472443_0.3848774005718554"},"_hasShrinkwrap":false},"0.1.15-20180824141518":{"name":"@atomist/sdm-local","version":"0.1.15-20180824141518","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"eafc687a578b5bcb57970bd91992d78681a9fd50","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-20180824141518","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-VHK3KY90G+gQRnYGpFnfcMuclqw7Emdx52jJoX4LME2GRKvJPAKTSe4yXF9mfrgfZTKTNJqGHV12ObisM/kMzA==","shasum":"c27a630ae2b1f1af5fc3e3644bd10cf612b5059b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-20180824141518.tgz","fileCount":352,"unpackedSize":1178187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgBOKCRA9TVsSAnZWagAA7KYP/3/5WmYATnsiEo6dleXs\nSyBiNb726/L263Nv0RpPsqoSSlbRS9cATtzbLzQlidrDRD9JFGEYWPD9WOf7\nvuSbSgTFMa4BbpNNF5NasKdRP1hRr6ZU9oxXT5Gbdm/4frFURus9ZEeu7gIC\nrzrMRFMc1tR2Y36yZf6JMTDTq44mkI4Mk7fSJgSMtDPX//aG0L/VCMVyIiW1\n/7mOJa+CvOdXXsaHRlUD092pNnGiF3wmVGefd4DxpT0WUab/VNw0Xjvpt9eM\nqxpHf9G0EY2PvxCtW4FYEVmw1VH+kxVFlrT7sCEBNZpygauwhKhBMnxcAAzt\n+OHodhsKzfYP0t8XC0v8PT5JjIpEheUfHTCAemfRlgFnVc8GChPxkHr/+wsj\nE++mzZmZLkEORZp0ajxSHe58+ZcJMwrqvoYfcqgKgP1QIrYft0vlhS9HWXND\n8mrLmgWZjlTh+7N6z9wQekOnZexwfYwKokDva99U0pH5VktR+L2t1glyDQi8\nmNRuMS6EsXPqXs64eqFiJqthTt98jr50dXNb7cFhbqO3XqKqSViNDe3ucLb2\nDn3SIPj/2mQn8aAFuSt2feDx+y1ZJx2MjK4psrQXfhIuszqbKQL2b7XFkVfy\nu69QtTcLE//IoeBYTBpiSW2p4dOg7GWVuvxB5drgzEPRefJoydDRhapFnZAW\nAZEe\r\n=ij6C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzPnxL9r8+PKDMXs6M3NIgg2je0P7uYFhcDof47wAQGgIhALIv7xYfhSZIY1Gm0Bg8Vzoalksuo8JnqY31CZhAoSuE"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-20180824141518_1535120266121_0.8791216786083871"},"_hasShrinkwrap":false},"0.1.15-marked-rendering.20180824141559":{"name":"@atomist/sdm-local","version":"0.1.15-marked-rendering.20180824141559","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"665513ec6aee9a1567c7ea05d9b84abd14ec6137","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-marked-rendering.20180824141559","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jyDXP5Re1NJHMxSvAYb0fDKZZkIu2w+o88xm9cm3hsEHUo7OjsN8yWC0ScbhHtbO/2BcmP2syg3CG14MXliSqA==","shasum":"ceb4d5647124d74b642a70162c7a891d08399c66","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-marked-rendering.20180824141559.tgz","fileCount":352,"unpackedSize":1177676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgBOhCRA9TVsSAnZWagAA0awP/RUh2IQ0IxIbuQdaVkjG\nhiK8Od38+F0JpHnwI0tgGpoWWTUJQaOZPUD2GrFKgdyX6gx/JhXQaEwTiPDW\ndEY1OU2MEM2GC35n+F8KrEsFuQqPvDSOYFW3VxhB5ZzUsu92Y7nNUb7mEB23\nGGQeVV6cgECgUUjyqHgO4kzHJTNQF4d0sBiCfSlsGp6TvGv4wDwulJA/11kq\nyqng1FfKbMlQY2wJSVwTP3R+MU4ODLjKNcVTBt1XuK/q1unsDxOZkX8pVmFF\nwtDmR3gU8YxGt/lq2lSUBjQdL5oLtTWhslJUoc+vkea74Qk2CyfcW5TJyWGE\nM4Qpb73y8z1as9BCzsN2zhtZk2wm7xQItPkR7/bvj0O3ATzgMyTas8LHSWJ+\neQWRwhdVgJd9pipfM+OR9rEQUlIdmFlPw6Y2ebyuSbw1dB9Gz3bU0SyskrRV\nW2A9peUa1Q2dsHeld/PnzaG0vaJxlvur7Pa7kzX9vtcgWO4M69gdj5cdAwYc\nNVsK+ngjQdjVqGS7mu9Kg1jFal5cMSr0NPB0F1jpsjIGmY6nx7JC9mUWayh8\nQNvwCanXSkk0pU5ZZmx5hN/WVuY0mDx+WgeYOK6dbT6tHproXA3zE315vSzd\nTcKm6dwc+t0rTobANUZ/TZ+amj89HiQSDjSds4pfRh03Bac3YBaqo0VTE+RL\npe2n\r\n=37Kh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwq8O1EomjHZ+JP2+b0trBQV9fCLAVCLsdhVpNH/GOLwIhAJJO58RS3Zd0aDkO6bTmqBwvYdcyxsL1rI6VP3g8mn6l"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-marked-rendering.20180824141559_1535120288655_0.9514532564717821"},"_hasShrinkwrap":false},"0.1.15-marked-rendering.20180824143505":{"name":"@atomist/sdm-local","version":"0.1.15-marked-rendering.20180824143505","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"cec266edea7d5a99ac01d8d918cc1bfe609039af","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-marked-rendering.20180824143505","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-srHPf7vx6jnOAmiRuvw/8Atuy/ScuijVCTXuvHb459odqN0a2IM9exc6LiBoaKxZ9mRGSygdybhK50yC0o3oNQ==","shasum":"9de9cbf2dda88534ff5c2c039c8e79c3abe49fb2","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-marked-rendering.20180824143505.tgz","fileCount":352,"unpackedSize":1177573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgBf9CRA9TVsSAnZWagAAG4wQAKRl6V7ikamUVWdvwJDQ\nppd+K1FFxmb8aVgEfT5ba6x5f6rgZ26mmCl5WYj+j1xY6isiyUCEy11wJN2H\nXClNw7AdLK2R29OgQdMxUwoYhiMlrjH9In1gVq9W87vJaprmAbkm51I3Bb6k\n3egZR6sl8o5uHi8jPvZrrdlO2KTQRcvr50Evpwku846brFNExnwRCqfNlyyZ\nZr+lGJ1Q6RXknnNVapWVsWNAhRPnQhf1iXSxCYI89+Gjo7bPM31hGkSdIy8t\nmWLGO8h27AZ1szzzfWObjH9fBUI2MellBXDw+Ldig7oeBVA8jg0eyQCQy/ZP\nz6zClCvLdoo3b1RZvGg3QMkwlCbPxCC7icS2Uk2Osmw9tFvvclr/+Lp53wJz\nr1hc4gbdwD6HUZHPhsGXsnvEhIPRilRnnfJP5XN16ONmy91Poa+Jd7imSUrz\nIR6rAA/+o+y3CYSC3LiaeuOWW3mh7yPv089eDWWS71x2NIS0Y6xyH9Ty4DV+\nQc9I7GBcDrwUDqUhHJQEC12lhEC1xczfbXL5kFR5iWugetQXN4MoI0EpFeqQ\nWsuIl4riO8rRuMpnh0T5KDFPwkvOpCqTxIJlcA1EqI0av8YjI0NXBGWq5Sa6\nLu8k1A6XbNXXfpcZ3p7gMSZ1dFUqmKbTb91eYVVW95FFwwIYqCUJGUz3BDKq\nSYHq\r\n=Db1C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7jUSKTdcSw56TZUU2LMPuaXM3FjkvriH0eGlRT2mAwAIhANb2VRxq3dwAGGdXaW/8Ueq/3MYC2TU8+kmIXr5IF2F7"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-marked-rendering.20180824143505_1535121405037_0.25259796152839664"},"_hasShrinkwrap":false},"0.1.15-marked-rendering.20180824143816":{"name":"@atomist/sdm-local","version":"0.1.15-marked-rendering.20180824143816","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"3cbf391decdcd72c4f582e03f3bb91fc54ee321c","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-marked-rendering.20180824143816","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-oG+fg3XUDDL5iVFxM55Ul5OCMH5NJvd//inhiEJZZYAfs3qYjOItuk7wHr1eb58UjhA+lNeWXJR2sWbgEeHvsQ==","shasum":"01d1a89656bc14bfdb145465b185f02bbd0aa043","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-marked-rendering.20180824143816.tgz","fileCount":352,"unpackedSize":1177573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgBjPCRA9TVsSAnZWagAAqlAP/1bDQconNT6iOX2bLWJW\ntwkHL6vtJBDcLKFAgxncmmTTHW0eQ/3ZWzNAwOzOy/Zmi/PlfmQKyoCHNCPs\n9IsyJJ+2AxyYTlX4djO5IsN29a4agkrnnv6QlG0LQx9xo32I3qWkWR6q08cx\nFOLMBco+8cpZiRvnKADXtnO63FrAudj2MGvW/y9TfRcySulW3tClfQ/+9NGb\nKb2un0XG8x6P4FltdZUcm71wrQLqAyXfSqCDq4DTf/4hJsZBlsjpfWLqsdXC\nGKUt6V7uxz8869sZRBz3705XZWAw40pVCoNBkhWP7GZRYqyl5+AWcoFiW4s1\nNC9+OeKtpEj681YQZ9BYb7oBcTnuD16uuUvsitcLH+G8zB0hp+D7lEGiBMZP\n/g0BdS8bkMAvt5LGoqn//GkrlMhFyLr7ZXEr/LyyfWSvcjWHjTeu+iqVhM0E\nbxlpT55kvwcJwq9cl5wwvDiAoV3m50ArFNF/EORuOXQnyllwYDbOAKOqFeQp\nRTLxR7g4BwJcb5vl1DYskifWxTHZsSmy0agdRmqgU74p8bNyJ72OmKpWze8A\nWohSi2kqnlsnTScYrUIp2qCjHI4XFAabwnXD1I4E0INIWWaauU4j74gLcWc9\ngf0LTZPxD57ge29NdYdXXsUrlmFRTDW7dm+n38RdTci+yJLyBjodKZkgwHpF\nM4Tg\r\n=alAH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCT1/X5W5oFYsZn61TfJ/BnGsfbAclXabZs3T/WzZCKxAIhAJqItu2+jkc8hDPi+tIrSIzNQ4UdhNCg8b4mS4AwR91O"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-marked-rendering.20180824143816_1535121614766_0.50112329290976"},"_hasShrinkwrap":false},"0.1.15-marked-rendering.20180824151214":{"name":"@atomist/sdm-local","version":"0.1.15-marked-rendering.20180824151214","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"f1f366a4d317c8fa785140095bd68526dc465372","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-marked-rendering.20180824151214","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-vKuLesKNNXP4zlxexp02nXV+u4DzidH8VVaCdgNtZeocNrBDAdCtyzwMt0kc+zyEFaXcqC5H69dAnXHSEFnOnA==","shasum":"d1e4f2f17376f747b6e65d150a800b2f479a4cca","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-marked-rendering.20180824151214.tgz","fileCount":352,"unpackedSize":1178268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgCDICRA9TVsSAnZWagAA1BEP/i4LXhu2qDQD3JmGf+Jb\nWhXfQVR5Bfk8SaUWx4kLQEmkUnQ8Bgr+tx8BSfCkn/vb9hSq1qxB7svYp7aF\nOD/JhLGDLDeUvu8LqRdhHoMDf56zieR7yDYk9qUvVToysfKT1V/xWZUOMZ3z\n0wAy0D1j6hODedZgBCp4zbuJtFG+uyfanWl96WP81231CaEOpb5Yu0pT8uUs\nXv0ToSTMqJmGNee58NFge4Hszxi2MA7dsXZkZvHve2sF3yAyAWuii8j8OemO\nC83c4pRK+rqHmJjCwCyf4Rsk2Di8qTzSo9TU2CuSzJ1Mw+BdixuvOu77jYgy\n8laDgMNSBWtWb+vkjzjrGIMxvQDkVgJgJCOL+Zw18vjfwBnDLXPwMz74z3tV\nrUK7PJUAGHLVVvnNWvxd7H6O9OZQ/OEHI9vZhl7mlXNdvCUMlO1Stx8oyajV\nWXO/E8VT0Y4rszRFTHLxCtOWI3AK+4GwRoL1ahwMbfFcew+20FEYy5cCZBtP\n7+W4ga839LvjxKEs3isIq2Y4UFcEDLpDhtJfXpi9hi7ch9hMQ5Du8lvwI7gu\ndpDn9eZ5/ouNWUWHKZZb8xgktbCcXf9nvnQkO3N80+VIsaywcI3RG2L/xLyF\nSWlgDaFrjxhFey+fWPulhLA5qbmZOILPkA/Ks9BNFD/9IGZ5I+MubKyfEJR3\n9KF5\r\n=KAiM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB5g2YIWlLUz44KoxdHm6Dsqfl/XdbAg4Rf/2VUVyUCYAiAjnk9YVuTrkmUrJhOdR9I1yLUlxNggzWYypq4oYJh+RA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-marked-rendering.20180824151214_1535123655809_0.7235516499452792"},"_hasShrinkwrap":false},"0.1.15-marked-rendering.20180824152539":{"name":"@atomist/sdm-local","version":"0.1.15-marked-rendering.20180824152539","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b41863171ab61f80db789621c496f6a65b967349","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-marked-rendering.20180824152539","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-r/0nRV1PcnNiC4xJi34YiG1xwB2CPlDNNblaO/3eL0MGMoTaWuLLM4ZN8Gvj1s5qmHFlKlgwPiq7K2NJML2H2Q==","shasum":"26c5542cee44480efe6ead61da9166badc9eba90","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-marked-rendering.20180824152539.tgz","fileCount":352,"unpackedSize":1178268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgCPwCRA9TVsSAnZWagAAUbUP/j5xNj4PuGuo1/mbWa+V\njxltPf1dIkx5jmxceiw+sZxsCaFJm9+Zgh8cnyAsKpTJXQ/bUsQMu0cbi9tT\nUV3gi9fN3p9foX0fu39qdO80O3sfQYOfGUNxL964eFStu+2elRnTgcX/hKb/\nFqRMpe1Vb5yziMTf9uXc/wUAY7gg0sTZxHybLdulpf7nbj5r/x/XfsgMZmsQ\nwm+RTl/9DTJrSdJOpPuPJmVVRpFvfzw0+9/X118Ex3o9BPtSRo7jhKyJs+4N\n8TjsepOcfvT7JhdM0k3fT/JZQo26LuCLI0RkMk5pdQp1Og36oVelwftVhPtu\no30pBmeZfzAjUctzNxClNDbCx4bXq/nn+cxbES3oJj7SJSWT8tEFEZPPIWip\njGau4P1qmBew7fqIDEQ2ewJ/NHU3ECXIdK4CtIkqPvy57k6bw1CA9fs6Jfc6\nrX/M982L+VjTPzR8sxzkaHY3Ch4cuu8k+G7hj0NzTT2kLogtskT9xyC46zqq\nUzQlRUigj3ecTDTkyyHIA0UnN3OxJ5Proq3cE2X3yo7pRCK1x78we6Of6sYq\nxQIpSQduabMPH3et5nwqfDb7+DutrjihAcxu0M+Z9rww/ZNUZBjfPUZIgRWV\nDFtwyM2XRRNYNH6BJprOMyIDllLWhpnPhZ1bH516xG4m4wNApeXyeI3/ZL8+\np6lm\r\n=yrSK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAyEHvZ5Du3AtI9AzZgshwiAlo5/rbgA+MrJs7gZ1SJAIhAPObi4uW18EoPHduVZyUs+Wsrw2rqRZgx0I0gGAHn8bT"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-marked-rendering.20180824152539_1535124463716_0.10285275366088875"},"_hasShrinkwrap":false},"0.1.15-20180824153819":{"name":"@atomist/sdm-local","version":"0.1.15-20180824153819","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"ca734b9c685a66331cc3127a5c4dea7787dcf7e4","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-20180824153819","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-k539V0nngIizCbRKmGFemoM+el4N2LhYcrDjvTn9yBWGDd6PRgiqxDnqgARSiyiDlu1H95fOgq4jCbbREeaRbA==","shasum":"f7144fb4e9aaa1ddad60917df6626ec624c9d694","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-20180824153819.tgz","fileCount":352,"unpackedSize":1179916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgCb9CRA9TVsSAnZWagAADpAP/3TWtr0GRx06WpVH7dgY\nySBrrxWD9EjFNDHu4fTllT62BvKOpDQ21woke7igbkECnqzgYi2GwuNltXdK\n2msNbwpZAhUMzHDef+QtcSuInXZ+aui9/MYAX/jWdngJRdImK9izfNmxp6m2\nT76t/Okk+Jnz36jOpN9mcPcwrp0ZXQLa6qujDdVYOg4ukpgZbZ/fSTwO/zqp\nquQuq+VHqvdr55CCZ3vQiX/N+gnfGTvNHVLltxVVpOJrXuUmBpRC3iU5koYj\n2ifE6J+Dk4YCv42fXh2p/cWUUX/P6C58O6G1K+84LrU3ZMlD0ZnBItbTGCkk\nBm5M5GNPhG5ZNvM1lKbu8FIxnbbZtTp2Ah+H9WlhqJkAuQtm7d+QPX2a08B2\nN277zl27+Ux1JUoRLC2pEDHg6kum5ZsVkEw/QxzAvtIdqliCTjv7XUZu5vVd\nQ5wJhyKA4U4mXbjQ21Zqfpkx3fXDYdC8BtT4HeX5+Vht0mWwggGxWbMReLA5\nmjIzSaJVb/+6sApjbHfm71l77kDemfUD81R3Cj1Uvev9OflxQcmD1Ik/nLje\nJhSBgNsIb8UGO2WDE347fHxC90+VgRZ+0+mz3xXc6y0Br4E9Pd1FLWif8Jt/\nq9oa8H5SNQkHEZSNYUtUKxKjbFYxTwdl3i4xzMkChyljZIu96jcD4zdPcagH\nF3eR\r\n=sixp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRa1J4BgqA92y9iei/fROQ+0dTHU3/PuD6ccI9MU/OxQIhAOg3W3A1qXdvnlXURdrdNzN1d80xlyZZfX5hzUQ4p1T5"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-20180824153819_1535125244277_0.0298458365126264"},"_hasShrinkwrap":false},"0.1.15-20180824153903":{"name":"@atomist/sdm-local","version":"0.1.15-20180824153903","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"4d949d6c5fcff827e8c02d6af37c1a9d2448944b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-20180824153903","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-fsWCywtp97XE7Wj8Am8zeseyeKNDYhra/sSn1Yidaei2MPeXlP8HFF7KfLwfgU0mSiHjs888w6pGXTCRgNye2g==","shasum":"bf9caaabefb2b6caedf7a7d2fbcfefa686b80141","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-20180824153903.tgz","fileCount":352,"unpackedSize":1179980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgCcqCRA9TVsSAnZWagAAQMYP/jPfFtV79uVDUmq4D0qi\nkkRpW4ceX2D/z3VUce/g/sN/Ff5COhQQxClaMlLRGAmZS0Iz/FAOHYykwHsu\n5d8t39r9d17chvNjfsEsTrM/ils9QEa0a1VJ5su7sSNTM3+SVmPrfeMp6kpG\njwC+rqCUl2EIKuCczaDqw1GHdqQSqGJFwj+eYXe7/4detJQbWlKW60yqTOKD\nNUwoBMkHJWhBQepAiSFzrmYegRYd2ki+r8ecP4Sw3i3UiuBb2wRZlHR4VjhY\nO+PVeYs2laY87rhe6PgdkaWVe5qRexYfJgZuz39EShdmBhFUTeh4TDypz5VK\nJlOw9BfQEuNHjLJsdm2JmnUL8pGQly79wul5a4tNvlc/eLxK6WOaCauTvlvK\nNvRgc0rJCcVsMiXDZ0V9M2eFg0ZDwyU0mC8p62YqbnVY4SJYFVPYzoIi06G7\n0b+hAjkfp9C+BbnaLoLra6yE86vL2f2oiYBZJ02d+3AfEgSKuwic293ChheH\nO7CIlWiaeI9QVQNLxWxqLQReUbl9Hm/kcSQVg5OnLM/s7g2mn6PlP/NqlMz9\nTpT88Ra7Og2PX+3JmIFbR5yzHs0CxbUSMC4WCtVWx/LP9exAVKX8x/xDVzUQ\n3759klzhe70+v6Sp5VPjwoQvTeS/fI2jqFLHVI2JSTw+rKAx0ZCeHdtRm4wp\nKCOB\r\n=4YQB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHtsytbGQvtwFd3jVsF1qezDIjqDJKfXxfYmVY2nUE4cAiEAsLdxB7lyi8zsvzWk54G9iGzZVOKYCxlmE1/6tY9dx08="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-20180824153903_1535125289732_0.9143079443089643"},"_hasShrinkwrap":false},"0.1.15":{"name":"@atomist/sdm-local","version":"0.1.15","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"4d949d6c5fcff827e8c02d6af37c1a9d2448944b","_id":"@atomist/sdm-local@0.1.15","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-i2PFcZUqv3t4CziQRH+khpC2zp4dv9MO3egAbo4/8IWT+itmUpt7v7wA2adFsSqlmab05kCoCVjer+pWAaq+Hg==","shasum":"c5352a36b567ab480a2c86188bcf6a9cfeb2e559","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15.tgz","fileCount":352,"unpackedSize":1179965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgCuhCRA9TVsSAnZWagAAk4IP/3r2cSBQNsXr7+mKBfml\nsVhAh1W9PJ9+6I8wynx4cKp4LQyoo8AY1hs5j/2UnAqxnL066/kKEQG2MZRm\nG8lXjLL5EjvkcKSoCWH7o7cgDSMOMeEWiM7rs/ajUDtB8gQ+Ir0l5gsAame8\no69fwJ+Y+jRCe5on8SyWME+DQe0w0wPOCwJu7iHbzThDnj50RYTy+L6JI+sL\nhCSth6NzkH3F3Q1I8nW2Urs5AEojA/0ZfKFDzLV8ckGcgg35e7r7gNaF4pa+\n6eliaqwh5SLaOFfXUKXJxup4AwaBikPo8z7T3dmio7lAZ9S4ZT5MjAI8w9yN\nGEe206OggzuCcc+7Lm0kGN7HlkUSrIr7AAlISrWEZ/Q+oKyve47/E7ETMhjE\ntcvW8wpuwOZBCCQas+SILgSCoCoD9Z84CzTBTNwskVhgIlfnEewRCBJ7/qu4\n11s/f/+UkP0nunc8n+EOia5nKujpsKRmKBYNcmfuZ9nSQk837sQwJSTD2y6p\n1N0s1fExU+ZohIbydMs0aaXKAyTmaJ6bfe96S66mFpRu5xl75999lWQQbyfZ\nvNXExkFvetHxCPcI/rw1stLFyq+FiSica5F839uiyjP/x//aTXh0BRpo4v+j\nfEkGzZiX3xwUMgtmhLaKzFV2MzvemZdYQURgz29tMaEovGLb2GlB0nvzMJ3z\nl8G1\r\n=PfNX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+O86aJtXmG6EgDNk7ySyS8akD9a6IMtogNaPvMI9nQAiEAls2ZjbZO/dMIjEeBV9a4N4dnggzEqwCyv1dJSJ+POsU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15_1535126432371_0.5573195677682452"},"_hasShrinkwrap":false},"0.1.16-20180824160130":{"name":"@atomist/sdm-local","version":"0.1.16-20180824160130","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"7c3266232c51f8354359668fc502ce771c5f04e5","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.16-20180824160130","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-CoeMvBBBCXIN7JWSbyFnSorWKTEN7tMfFT1JUheNi1QTHPv8EQnJn6AqYXMW0oSwVgWQ0fXyuDjIzFO7NxT/ZQ==","shasum":"57f0062ca5372e17f2180f8c4c690bb58a805c0d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.16-20180824160130.tgz","fileCount":352,"unpackedSize":1180196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgCxqCRA9TVsSAnZWagAAYUgP/0xV5DPfHkiCpaAoV+NZ\nFNE4X7RLI9U8uDVQaiDzTfCkXhi1fe+oyngZxSGUn297qLKRXGtMmryaiwpV\ntyf/ah+Yl5qsysizGtSHZyFnqmPrH5HcBe1k6j31YTfbr51FIipM7NhTpZUr\nQDh7Q4n1/mKNkeg/aiv2Ae8PCeMLJ5GyIqO5Hi1yyj0oX3jzEMVdem96drzz\nAVpdLomP6KOX0WEtdBl7RNjiL1YGppFUfhZYF/dMUobxZLb8d97dEkAW6PJT\nW2ukkoeNqGigtPmbKmL8etIQepiOb9rGMjnC6jN0DXUuwbFrAgh6VJ9tUglv\nuh5c4pj9GHOscKrlfBianpqfkfrGCdEpLFsCCc9EVQedf5pMaC1qWpXedu9y\nbMsPuTruc08grj3BtwKj94ipAmEPxGEh/ZynDMz8TlLYSuhzoMUP7b/hHcjl\nTAMphbZlwR7WEGArs5gNpFaw+ZQbnU0UvJDv9qViqrtsDgrn5vFqZzAD4I/p\nIJhzjHgULq1fBxCE/ckT891akRFzL45j0Zdlt1qysLR6QL8ouGPlq0zGkDR/\nPXYbSsw0FUpVLffwCTllhZyaJAolL4ZOqsRaoGzqujK0I7r7YtswuoVTWquL\ncUHX96IxCnlTaHS8B3Pwe16JID/FrxgGqEKymK7uOv0Cvp5a+FpSxRXewCPF\n+tZn\r\n=myOj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWCYno8h1NpEAl/Dsvg7rogv/F4D1qwhct3kaEOybGkQIgWQktL2GSJgVw598mDhVWJLDDkqTKUgsD3gN2AUzd7yc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.16-20180824160130_1535126633392_0.19416262724860167"},"_hasShrinkwrap":false},"0.1.15-conflicting-commands.20180824161741":{"name":"@atomist/sdm-local","version":"0.1.15-conflicting-commands.20180824161741","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"54a427ec7c87dc0a40512c8f736720e6609db8ad","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.15-conflicting-commands.20180824161741","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-9Iq8f6cPvvjbpUdsZb+fmeh33LB0+nG2P06M9Zy/NdAzAj66puacuNXn6JoFm1wS0EvxJ4HlPTXSimF8Lp6L8w==","shasum":"7d2aff77c35aa411ea5ee4ad3b350ba3803a8ee1","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.15-conflicting-commands.20180824161741.tgz","fileCount":352,"unpackedSize":1194042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgDAiCRA9TVsSAnZWagAAo6oP/2HTojUsLp6031kfpKvJ\nAb+eaLTzler6N3+D6EGJG1LDOHrqrbrJP+R+E3neeBzb8c+I9Snw5rt1lyUu\nob4n7NtzTq4EVUSJLiQwZo2OYJh5xPFjiqvGVSTo+OOaw+qzLuSO0yRjN4A/\ngecENYTl6t1Blsf//RCoriobuWqhx/8G9IflHxUHAH1NiJicQiuwcFtZE+/u\nB3OPsJsXrjb0OcWmRl6xV0KSUk8/1/5LeqZZX+iZNjmsoO0i6j9DzBJ9V+Nm\nf77E2VvTDSIVSQWP7FBddPGrLgc4CbNT9goDwvJUeamr3VLBuBuWlHXQDaGg\nLGPc6Ig6h6rq5VPqUlNe/HUE0PltUoFVXAUB34j1QbB9x4IqL4fZdDx1ozdm\nHWK7fTvDMsTRjwbd77TrVVI9fDDZuVNSFcjCzy+QxMRtSfFYoDkhgh2/DWBp\n0Sh5fTUkY1mrK4iliOV/SenBs3mz9nvDS9bOoRHoRw30bduqHJLO5L/AC/bc\nOxfEROZLtuFpJw3Omc7ZdX4RxY1dkvNk5OrvmigDra1CzpTgzyj1nxUHffzI\niwb7b8r5B+8LVh+0UIyIhVEEtIUqFsSxFYOt/k91z+H4Q5piwXqNthWHFWQu\nfl2mg70n48d/XJ4ZxeseGKlwXG5gFgQlzXI93lMKTDbl2MfArqdHXExSxVzH\nZZ3j\r\n=rob2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5VfgPilC08yxOLABHN+pbQD5Yo1LXSTGF0G14vOxfqAIhAIPlmjk1mCWQlMNnZRh6MYsVT2boHKjEFKdhL/xMZkmT"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.15-conflicting-commands.20180824161741_1535127585960_0.46027265471365575"},"_hasShrinkwrap":false},"0.1.16-20180824221232":{"name":"@atomist/sdm-local","version":"0.1.16-20180824221232","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"f09c16cadf7ee9bcf1d6aa780b7c27b0a70096ce","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.16-20180824221232","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0E0aL1dvCJ8lxFQQ+5AA0sJm8evA/wdXwQd9h43WqbQqrFvZ9lijcBv+Zh3acXAwdKakUKyRxt4YUGQHyj0zYQ==","shasum":"73ddc56dceeaa3bb8a1ad00259d90fc8bb10ad2b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.16-20180824221232.tgz","fileCount":352,"unpackedSize":1180240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgINyCRA9TVsSAnZWagAAi8oQAIIdRD8Sn1uG39sKg5wA\nSkSLoDcww2sAQW4d0p8aG09M81Ll1hsErJm6KzAFPBhXlWFRnuJfcLoXgac6\n+AXCPjEaGrpCd0/Sbb3nUC5QP6QYRgv5hQjLfKD6jzQySHyvjSbNhls56B+P\nPdYSaH/kHJFibBdYg35GG2lOyGAv1AHZQ0xVhziTUz7U9oCZDw+1YFTrvRLE\nc08ZlKcGAsovL2WLdXAsQ/Ff52GrAUiSFvxgwmdvxPpCkXgaBDm3D0H6tZNI\nUJOiWXe9GE0LPIBbSDOw2LcMAzLJJ2A+8enj+a5VQLhcZMXCL7zILogQxYM7\nDavjK27iGzyD305YIoFHexoAQHB9SeX8ijC4h1aI30kV3bqBClXwtgBT5Edj\nlPlgdnddZbr7LIhtdUZk8mRy0tP75vSdFeFIQiCupcE1SnJiBTH6FIvfiW42\nY7wz6+7ZZ2tg6ZfPxxLJgWWnb5ZrXxht6NztyDuXQF1Jvr7bgA082KTOn23W\nxxF9WhFgt4pUp5cKO8lMyYP0MFsM7TZuba+j8fqqtrGbWCUy1nnsKZhWdYDk\nlJOmGnmW6RjzBnDBohVDG2oTG4Ok5sLXhpcDAr79x1AbQifU/sMLsbbsvGMr\nilfdEXdtFnUqpTq6N4aAEunQawKd1qwpCNDmanqrG11HGTpQydSC1QPqe/Qm\n45JZ\r\n=xIgN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrJs95c66uWulH6dCKix2WwOAu4R0viDJI4NjqthEkxQIhAMn4K2E/ftEj/x3fvEhXINAzt9dEIDHNkFyA7864p84Q"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.16-20180824221232_1535148914153_0.44094221908932796"},"_hasShrinkwrap":false},"0.1.16":{"name":"@atomist/sdm-local","version":"0.1.16","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"f09c16cadf7ee9bcf1d6aa780b7c27b0a70096ce","_id":"@atomist/sdm-local@0.1.16","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-T2X7uksypk6+7wdd3p/5e0uKP/AhMVjTaLG/nlyaou4Ym5FjJsFwNmrDba8/TpnJfqwEP5/OzfawaElOw84C8A==","shasum":"8c8c69c7abad2a07aa17c0a995e6e5bbf2dc77e8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.16.tgz","fileCount":352,"unpackedSize":1180225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgIPfCRA9TVsSAnZWagAAs24P/iZeXABQgCv5EE0PQ8id\nINhxcqCIzfgUKEk8ovFBKqhl1o+//wWDLIcE5fgVyFA2F2RaOjC64nFvjIwS\nR+bL/mg9ZRIUSNTOlp+48f5gWqFT0I11RVzIeJqB7ukb/4otqyXzINJqSVsz\neQs4Zd7OGNUJY4Nnn6e+Xv4t1QRxT+g8ff3iLocqYUvnoSCvoRuWL23N58By\nc5NnHBWe3urlp5J86gWWz2wmiHm1GnP6qkQnigw0tMe9CYhqe4s+MBsOMHif\niPnzTGyHr++x7z2zJgxmGDIkZR9FoEPg7KkxMttOi6NSPzHC3Hk8CnLww0/P\nd5ZPFuyl4otU0E7hViKIu2HPnIfVylTQmIJCBthzKiHSp9Lk9K3+Juz2USQH\nc+HSS65pw+cKdYEutg5Zz3y6zFE0CyZYLIhrYt3ij8ZD81HZPYA47VXC9m1g\ng5Pknx8eZjO+nfx1+/qLji6WNPkZ7yCzVsKR47hGw4ZhaA++R9gqPdSETR5A\nHwcxhZMQETS8T+zcUpRZrCNIudI2IR+A5WvBENvCcyNkGRRr/0C8eudfBnKl\nLm3HNAtmjJra/uV0Lg53CtzahQU76jEmlzbexZJ6DxLQlzwGtJWpyl6SuyFP\ntfpgK28WYF9mZcLXhAoP0hVpNIdOi40DQxNVtj/85ayC6nU0iISPDq+Q43YC\ncj1F\r\n=qBbn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFqyHANBXtu3u0v5fz45kgsefZefJidFKH3wnkBZLnwwIgE4wLvTXhNnE24UknRwFIEdSLdb79s0xiWWnYyg/a6ow="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.16_1535149022510_0.699447513346712"},"_hasShrinkwrap":false},"0.1.17-20180824221805":{"name":"@atomist/sdm-local","version":"0.1.17-20180824221805","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"703cfbe99e3741b0f9aec522a05bc0317c569d53","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.17-20180824221805","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-J78eu6G8/iwVFoH6EMgOL025DZfvkieUXVklwWtygUDiGiN3F7xURELFI4jIy4xrRwtyD3gRzAFNqkYExxlHFA==","shasum":"b858b5c5f43b9b4249ada6b804f6ba18a6105308","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.17-20180824221805.tgz","fileCount":352,"unpackedSize":1180322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgIS/CRA9TVsSAnZWagAAil0P+wb8aXSAT4YeAPZ3SVsR\njW2JkirD9Rs9SguRDMEPSogjuUiwmaTExQarLnvbWXlxbaezHKijzdSSX1fJ\nD+nKMENzG4To6jsNqqQ/DTYl8LLpt0c1SvqmAlo7KXka1fJicxJ/CpiEpyWL\n3HoI8HTeDqnnyuGo/CcZQ5FyMpcXiM4oo00/cw9DwGd+YmYJDxoGRzO1ayd2\nV6awZwGtMg7iBbrQop3LJk6S7aN5JNs11vThN8sgzE1Yi35QUkuFIpEseIS1\nhvZBdEQfpzxRR/yzsMd7blLZ/zs803JBA+rdyGD0L6ERCDe2wUDCB9K2OxTH\nSS3/MyyYD12FI4rtsquu5yx/YrJUbMVNS+lYVaBByX5ailJyUbcI78bAUvN9\ngvFoVKCiklHppZUOsPnsrX6LDVcw9t9diWL1vouue5KhSR7JAIOQjGE5s44R\nU8G2Bx0W1iLmw8kHDe6U3cjOD/+m9TVodAjD9bvkTl2dB52HhC6mKkv7Rm7C\ngqxcriy9Etml/jS8w5gstzHW2NhbR/sa8VRfZ1T2OGt3GOmXxiysGDIMgEnb\nnQ25eMa1A9xShU9xSLkRXZzN5GRA+QeCXRwLfWg+cvCiukhSiZeaqfvqmtr+\ndrZ52uX4ChVIhBAti73KLltZ2MtPOhoPtW4fPjulOd+AY4mRQJS3RfsSTzOw\ns8hy\r\n=kGce\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC73pAlx846jTuSfzGJqmbda6zH3acFqAJxksu6yZw2aAiEAy2Ej9ictQhZUctWrXCKyU9MlXNsUu1a378/0pWlmyNY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.17-20180824221805_1535149246644_0.20154574262580094"},"_hasShrinkwrap":false},"0.1.17-20180824223638":{"name":"@atomist/sdm-local","version":"0.1.17-20180824223638","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"624e81587d4ddc79dddb6c62530717d3f3114d9d","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.17-20180824223638","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-BmJR803Za3L6z8VeKa121vVKMFwInhVF88E6baAjuMoHvSzOq/OlZ8qmGjqrstNO7mkprggXIfCXdUPwInKUxQ==","shasum":"78a4e09d77c339ba7a928186b58264414a443884","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.17-20180824223638.tgz","fileCount":352,"unpackedSize":1180324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgIj8CRA9TVsSAnZWagAAlnYP/1m1uBmm7g3mm36fbRhU\no9GpM12xInFvYl7+YIx5yJNmeeeNLHW/X/fknz74C7HlfjdR2hNIn47YCryx\nViEfxRbLo8owidtxLkhlAKNm3BF/4EJhFtpiwPV/lKF9/EgzOLZKLyYTPuYo\noXHvYS0yzdA2LgcybS0wJEVT5uYboYBMkbBbFfiyoD+g/qNVFx9ShN7WfOmL\nErJpErbSwuhJ+/aoU5jOexRTPR3GRIcuYBWWc97UJl0U0XcQIuUYWZBpTS57\nmcb2BcmVK5pxvJ/kNMZE1HQEoHjpmGIN6wDQyTgULm+o9Q0juV9hCfW/+vhf\nD+ezMxjMO4JfhQs7dwlaTR816dXGgsWdTyj+PJ+OA5PAchNF3ij/SbJQitj/\nfi9hwS6wBF5/iPYjd0htCJcoCN6evxAPskcwKqu2EC0P2N21dqIqZ/TbXe+E\nQ4gVd2MDD4xwwghfgkzaOkOfWkrPf2hgcgtCvUQaoQ/0jfJA+1DFbctcf1qt\nE5N70zj2lUuS8UxBNhPfuc1KRg7epVWhYhnhdEKzPvs9aNtFzLqNqt/jtrRq\nOkC+LA5iNJ3TJTJQEwoQjmVlbW7ac07jGhdPtT/jyz5+wX/1eb/+O/VOJqMv\njHqGAXScTM+UwT44sj/J42haMB6Soo8bWVVkGKmXyUBgv/HOgb7YCfCAVgjq\nNBUN\r\n=3Y5S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtXr2z7pXsvz8BMb+5aw8S8w9xiLl7m0cZa9Zxu7aWCAIhAN8srjhR9Cv/KSso9KPC243a1HiSxyiRG5Heijh4f2M6"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.17-20180824223638_1535150331375_0.4400820913923358"},"_hasShrinkwrap":false},"0.1.17":{"name":"@atomist/sdm-local","version":"0.1.17","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"624e81587d4ddc79dddb6c62530717d3f3114d9d","_id":"@atomist/sdm-local@0.1.17","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-T0AQbRh53wPbYCGPlma5y4wjH4W3WcF321B6HgJt5wXbR7JcPohyVuo4E0I2FH31dlMJ0gXZlpI7ecjNAo9CHg==","shasum":"922344cd9389072c2e156c9cdde4f703b1a3b8da","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.17.tgz","fileCount":352,"unpackedSize":1180309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgIkoCRA9TVsSAnZWagAAZm0QAI7KMG9HBUxpunus4ldC\ndTDJRSUg7hqR6cqCX3t628wFRrsj1lbI8je6pXWT30cSUhGzuumBS2AJnz7y\na1Yzj3SAF8tXlxhMTsnLwhhdHzpcRfFmJhj7No7wrpfdoqqHbYGWp3+S6/WU\nRquE5L51c32AHoVRkjc1Xx4JLcY4xV5ICnQVKsomekKCZ/awcURhamohaXLo\n1DulOPLOgBHmtahKFtnjx/W8uFxMAQ3zc6O7UVNi8Qc6xIO965Habx0ZQtiy\nTTbzXYZo7XC1MkcFgLai+E7vYvCC7SGGhTe6HzFLpYx6vx71kwJb0WTw1n18\nejQkMYLpUsOag1eEFizHn+qOiwSAkHtK8dy2+38Laqk2Re2wu70ia49CQlZj\nBXHFS3RMyZuMBGUsqXTA9q2e5SYsNGUz7C1q7Bim1/379PPdzlutU7haYH7V\noeYEYZs0CcvqoKTXrDDva6/Q3O9cMm448lcKo4oEBKDSPSBeO9DF7sHw3q7x\nl9hd8CBbBOnIno4+O2/kDjm6/Db/yQvBC6HnEqA0oF/IKEuB6sFB5lykqos7\noTKv2VF1ct8j8BDUyuzQtlCGeZTh6jR4DXOrBaoyxCpkWk8dRQ5SUZHbeWwX\n/qIioMGgOeZEQ4L3Zi1VRpIAEtaoB+xOQ7IvsRmsC1+EUxtMTHVPBfROiTZ6\nrUvb\r\n=mdPb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDLgRBsDO6wOw/XrG1a+ugXUyJbr024f38mSIZn+GoRdAiAc2u8YnVw5KhEMlLq/jl0XNb20wAZY3RvoOrCE9vqdiQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.17_1535150376160_0.8162342789866659"},"_hasShrinkwrap":false},"0.1.18-20180824224045":{"name":"@atomist/sdm-local","version":"0.1.18-20180824224045","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"68c76f7d38a177b461f7b2834b2bc86069731e3c","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.18-20180824224045","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-DVqPcco/JYY98iWZX21px37d4gHQPmc62ffnGQXP4cK+yn6TXmfA5RcCBIsIJlYFrCtr8iw2yNaq6DxWAV8c2Q==","shasum":"5a63723043dfb4c344d06651f457b7d2ec0d0818","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.18-20180824224045.tgz","fileCount":352,"unpackedSize":1180406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgIn1CRA9TVsSAnZWagAAxfUP/i9ye7Gf1AVJiHYo0xAl\njIZ88+BHtyn+shqAln7oSVas8LiO9ZrWcFNl0P+u+yybudHIP8AmY7JZud58\nxOSNGVbOMKA6Wx7MT05KpXLLLjTjnfcCmXIqI4eYMHS5jEg0c+f4aKuQQaWj\nPNbv/NtLeqA1cwpIRt/S8Q7gTh1K6b33infbob6m9q4n5ak16smJTipbpxXf\nTnPe4cnwRJghVgOeGio/GiA3+gHJzfedlFGuItP03isXWpum7jdNRbfLpPgW\n9p3mMfaqn0VsA2aLTWfHsOyfHuKomSCERuDyymUSkjKjar6SLYqb1JRsS90W\nwnTe5Ys+oYj17xdkJ8ljG10pdP7VFZT+jd1ciwx74zc0FeGJlxug/1P2MvPG\nsZcNKJSjd/ZnxxFt9Kr/i7KopVzg+L8+S8MqAvkONTFzvpqMOTAVmn8FGlL7\nigtkC+tW1x/PnBKQj8TKR2I5OStgXjfSznjJEe3NmXMjyed0m7vGCnGtj2Av\nt3p9WEjF3HlwT4D1XQWN8olIbwrjR2FQjD3FDyL/wKIOHZIWgwF+2bVQVAvB\nxXXi9fobn2ldUF5xNeGvSo8AjglhY/MyIaaKhx2sMGgfSvOKJhfpd89H0KQi\n2sxmGmlgI2uzjhx3Lk44Xtk3rNlrTDEtVbZFLUslK58gcMTYOVVTAKZzdXgH\nNQWS\r\n=SbNS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBGGHvGKgIr7JrlVsPVBQ88iUwIgezaeOOiH0LPGalsBAiEAre2WWgDa1GEVr+LxHXNiZwSv3B63FZPEn56Jsos5X1k="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.18-20180824224045_1535150580856_0.8124292198489111"},"_hasShrinkwrap":false},"0.1.18":{"name":"@atomist/sdm-local","version":"0.1.18","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"68c76f7d38a177b461f7b2834b2bc86069731e3c","_id":"@atomist/sdm-local@0.1.18","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-WdKm+kLG1AFDDx0WKCobSuULBTr2InPDm0MiOGIvcBaVANb6MVLI1tCpDykjWJFjVg02hDcUdrRVu8ad6mIlew==","shasum":"1aab1791d8af202f357d3f149c4757a932849f95","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.18.tgz","fileCount":352,"unpackedSize":1180391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgIuTCRA9TVsSAnZWagAACDwP/3D4vrrpm41z18tJ4lOx\nfhlxEKI2piC3LHHLHgcLSXuloviwj9S1IisjGrKgdj6gbpjqsYo1GGTYKFHV\nipYo1pyeFCPTi38lMRIUu9Oao6FJZXhTkSNT6zlukhy6ct4xKigZa+4h9nxe\nKN8IoTMHzD5bidmWy3OBF8hxJZ1XS30D+FuhrGImqZeg9D0S9EgRF9VxMSNc\njYmtVR+e07o99BvT8qA0oBVNXEY6shD5lmu5MSbmJn5MsmylrNPraRWiDrPp\nXEnLe9Xf/BA2lpMsCHvoHUi/49ks3n3IpOFf8akm2Qv9Lg854fFKIpEc1vTB\nPPNIcY+edmZi9NigotHH9/eUuxyE3gZ0SYShcRo2x8Mf5334X8aUeG8k3GUm\n/j4YejeJxPwa+omhrMEgng1NyASc6YzNVk1tG+iG+G+OSTYLEoFzQ/d1BtIz\n9BUEdd9Nd/dWwj664cCljhRHvaiZQQNznyrg5sQNr5cL99oAmr8WqSKenZpA\n0RwFXzr4uFm2qF0MifUPWeErbFrlKqYkQ16x9g3tRZgeDzIDVCvKI3wOylD0\njndZFDY8B08tRp+BLjoQwW6Jyne8LRUPx1E8rCth4XKewx6kbAJAJfzp2fkp\nyI9/nsUiuLz6KfywKyNuFXmfcmAWXiBlc2/Lv+wVzgV6BXbGCPs9qOyc2LXD\nZqoM\r\n=ZVAI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBzsCWAVY8Q7Bv5AcH69E1JWgD5sDx5mjUGj+4Oh7cNZAiEAwYTZET2cd3cX7IJizMb2TCmRpBIhvFoJh/DLSBTNBrY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.18_1535150994698_0.7493428983994406"},"_hasShrinkwrap":false},"0.1.19-20180824225059":{"name":"@atomist/sdm-local","version":"0.1.19-20180824225059","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"8640a114d8cddab033444342128d069820039839","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.19-20180824225059","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+fGKbyh3wCJdNvn4ztKwW6QZFmNcUbESf9lS/EvbqQuwS+B8IsnHYlBSjwHDZSmWf2q2L8TV9cAMxYCCv8xeCg==","shasum":"af0985f2a56bb3d4524cb659496a8ed6569ca912","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.19-20180824225059.tgz","fileCount":352,"unpackedSize":1180488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgIxnCRA9TVsSAnZWagAASy8P+gInRP6aZBy5A+BOmXCF\nHDIfHShcX/e4fG7nDAqpJ5uNUNnLKHB9yJQr5Ri7jSdNhZSexcl/6yg+2//D\n+fhQJC8G90xsApLm+HftREjPFIpzJ6z3MPpEbLwbsswCufZAeOqgBPHSI7Ll\nlmLq7zlmeu6XRSQk4d6n4XSwQWVK+zTyOFL0bqjVFEtZos1Ht1BQByU6h4hM\nlybR5xtj1/tfCW0EAgwFnWTvtzqXMq7nn4utuQTQ5vgT55KjKXB8DKb9KMo9\nzGg/gwc6ffoTrPPRakXt/+eUV3A001hVUsxO/MMXNx4nWb/70MUe2tWNuFPP\nSUohRAuHG/BeYDWi5kMvfmeY9f5ebPUqZZ9a+NIGzTqAQOwdmBE00jLOqJE/\n8pSQbUwzBuaW0UKoshjS2FuFCL2Bmc6OMxATz/9F3ufb7Vt6PWCkKrJuKcs7\n+96pSUOsp3B/lDdSDaBGSEkNEAx6Cy2RRAWz1V+7tNKUOTrifpQeZJmuTE4z\n7zNn5z/Ubsjlz8wMYmxc2LhYwKiHnShh2zn6ZaDDGcxOzS3g1hJUJaf/bngq\nTtmusNSwT+vknjtSjHkpkSyfEI1EKqZLJBv8t1owJY5UjHn32ayxaTOhMaYe\nH7vT7DQItZdpIBU1wzammfxas4zzy/4iBPd3/jMBmYbceGQ34MkneqLC3MS7\nhyjH\r\n=KAQx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDojDjIWH7ef1dyzBYk2+cOfI7AuSm+Foh587iLfYApZAIhAL8A2kHZh3jIt/z+BILFowUFHL34g/ILxlDsoyUj9kur"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.19-20180824225059_1535151207181_0.32616244618570245"},"_hasShrinkwrap":false},"0.1.19-20180825082520":{"name":"@atomist/sdm-local","version":"0.1.19-20180825082520","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"782fbf63a39e7a1bb454afeebe7583adbd49f8f6","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.19-20180825082520","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-niCHBrESiQGc+epUsUR26S533Jbp2EuiI7ZbGWs4RJALZ1mhDUhwyiUbFeRMbgse6oaATj2PW3mb8lBJumFznA==","shasum":"0da82bfb17225cde3dae5db1ca96bdc83f24ec83","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.19-20180825082520.tgz","fileCount":352,"unpackedSize":1180287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgRL8CRA9TVsSAnZWagAAVK8P/i0ofd9H7gpDCdQQXjyq\nLck1eXwW/2ukcUWN3RshObNXX/OtAHLMH+EC0dNnguN7Fh1z38rwIM6sLamn\nwIb6ZAeTV/GXMfYBqcUp8FvTMaDufJy+uahE+QLNzPYqmvN4RXutPQuZBEAz\n0XeZPu1HAe5fNJsWnLxuIbYtqCxAvU2XlUY1zud4clP/ua2E94elV8hrLHbp\nsH3ZtofrdF/9ERKR41FA3NgRIV5g5x4j7AvpUkmVZ93pZj4NPYiepSGjmKy3\nehBBy2lOmOAOf8dMW2f5bdHtA4vUpqIrbV/YtMPzWO/rgMfSJVV4qLs6o6Ys\ncZKmWAsHiRrTpxm3t6mgHFD5oxkqlOBTVw83kjTxR0QiPTR2haZd/qYu16zN\noMpfdvzaU5exwT58ijOzDX71U5Q2rbEMT5CnRGkw9cPYYEoE/3Q6skzaXuM3\nwWqveJpC54OFmP7r4UERxX8nNzaf2nzieCQzOpyV3HP64BTY45LoOKzPWi8V\n7txiZtZDOcnN5ReazA1xuFKJNWjs+eLs6VZcDesD3OYBCTpvkH2n3v7sWf2w\ni3t1IspS26FSfEeVQTEYsGztIvdDxDv3uH67GxdZoXPUl/XQDCYxO3/7+KjU\n8RO/Dxy2SgHVRuNKTzPrpz0gcFbspInEah35IWgNP9MHpApSGuEKHlunf00m\nbz4L\r\n=8pWK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVZWt9SUdOIXYoyuxnJ287iEp9lEIUVwGezsl7tMtdGAIhANIVYyAL9yMNLctYXkIRYZdhJKM/RAT/qHcLM7ZvrYbP"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.19-20180825082520_1535185660006_0.29929665743987544"},"_hasShrinkwrap":false},"0.1.19":{"name":"@atomist/sdm-local","version":"0.1.19","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"782fbf63a39e7a1bb454afeebe7583adbd49f8f6","_id":"@atomist/sdm-local@0.1.19","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-9S+WRUFrywwjVaqVr4B0VH9Rsmq4vuqxptd5aXX1h/IcGkzY3GJtE8voBdYYLaQ8JCJT3eFL9IcySs7IWHQ35Q==","shasum":"69036165b53ef4f590a116f3570d582e23744e4a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.19.tgz","fileCount":352,"unpackedSize":1180272,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgRMvCRA9TVsSAnZWagAAYn4P/2eCiOw71t0CEVR18Pzq\n7SYXeDYqPyAOvGgOmgonWD14evfajikPCgRHbQVv4JMO8bruLKFsdi7GlYUN\nDV8e1c1Ioub0ioOqlH9N4yi+NWwrfxLL+v+eDvGzVXlnQubv2FO3UOZg2Wv5\nEmZj2sLoER8TShyOc8IaSurG1cD5k5AzPQiharHRRQLH29tanDWWQj5jjFHb\nnX85fR/gnBhlJkwEOp8ovfDc/D1DoBjYyq7TLuPZ0frD5fWNL7zlO1jH+PAD\nU1KCW7l92uCQP4pf2sOp7UC7xDpUhSJFxVpAdP5VlyJ40i8bv8J+PyixFtzJ\npHG5dyjytap74XM1hk5tga2+9ieD5Cz7awepwUmnNHqvJvDnwaN1r4wunK1y\nwZS6xP0pyZRTfU2GFcXmcD+2xYbVIuQcaEPhIsp3scKT/VfS9/CXTiqyi3hu\n9ZTU9SwAy2BLgLJnK9fsdDWHZV2SUZO4q0ylqJkHI3LgXWes9O2D8oXE2BNn\nAsBhAyMS1QEoImzUb9rZjnDuFCoZmIlPs/4fKIHVE64J/+8tImEk0lbCUsFQ\nba3d/zl/jL66GuMklApnVUZCZonZgdVCywm597wWkv5dkJ/bY4NOv4HwGe93\n9dIAvvv1lgjAi7Kl7G5sYfCBdBEq8zka6ilGxG7fPXukdP/HbR+rezpyZwQ6\ng/Q9\r\n=/dVO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9oK/7n/ZOdvxF3RacaKMBXpQ7WjNm4gU4Pjn/DGQjuQIhALB1vGNQcFZGwXMFTBJ7Z0xorS5vrueJD1soxn1RmGyV"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.19_1535185711300_0.7387632865256972"},"_hasShrinkwrap":false},"0.1.20-20180825082926":{"name":"@atomist/sdm-local","version":"0.1.20-20180825082926","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"297c6cfe916975455149b827a6070d40d8787f1b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.20-20180825082926","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-bnp7y6/929UL/IdnUibKzfNjgnZF/UG5qBq4rmsqexAWDyyPYOtgeNa7YnjazQBtK+dz3D5jE4UVWdc0SD//QA==","shasum":"23a31972d2e62df739aa2bb30e6e1ed384011e9c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.20-20180825082926.tgz","fileCount":352,"unpackedSize":1180369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgRP0CRA9TVsSAnZWagAAW5QP/iVaWUTaH2DHMd869Ksz\n08EgctcSiOiV4R34uK1gsMtZjy5JDTnxcwR1MWNIMPp6GWQpuwlQzyo5oArF\noTPJGfNEDBQ7z6Qom/qGp/B75J6gfL8c3VC3n5mv/0u1JyWYvY4CLDbUmH9n\nO+QXReHDepjYu0C4CK39wS+7rr3HwdAu1LUiQI+tfSe12QXuhXSMV9umrjwz\n+JqsOUHJf9iUjXOCH5eFo5aWy26qM4ziaz91T9kJryvbdXCTGVVqKXNxPIEi\nB9G3mZJv/MevHFUCkPZmZ/GJrq8t9ZI1NgS28UEU6CJDlLrR8kmrZV3yz39/\n6c3t6vUYGAOJHRO/BVZGcnaVOjnJOOED+r4idKDzav/IMpLa7boh6Py0eb7I\nyfxKBcu+teP4T7zu89opNYHFC2InIL7eGS49RIQzRyNjX6SK1M1fdXbzN2X3\nMnXtnCFXHV7X6BlsgwYyRVozxWf+Uy0j0qoW23m3J+DHaa8w86ODfiVgBBfh\nPAxmHzvJslTn2uilxzq5aV3GQ0eYKZdlJMDDh7spW6NWtB4U/fXpRxUIe1f6\nwi03s26dJw0YJxa92m0ogoy6iPmAW+PKs9MrI0VYQqiQTxpvDZzEdP6L2Tdm\n8AUFvb/UvrBO3NYD348f8Xd7mk1+mEXL+ogn1Nwu4aZTkq+LFwCqj6g/Og7l\nI5Iu\r\n=IkCn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC7w2eOhM/+C9uLOKH7ix1c+da5Ft3+ZJ2b5HcGIQjbWAiEA5mgOq6PnA/mifJABrJ8PXo79N3MokXwHrERzyTp1Na4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.20-20180825082926_1535185907895_0.6977572405750148"},"_hasShrinkwrap":false},"0.1.20-20180825085631":{"name":"@atomist/sdm-local","version":"0.1.20-20180825085631","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"ab355e46f36d01bef34c8ca72a81e10e8926a06a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.20-20180825085631","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5IIqyBE8IyJg0AkxMAM3la9ITjDXsj8GUv+754QF2OW7+NKSmGI0+ID3/mh+uXPLrnknf05Bx5qx+prL+M2mig==","shasum":"b5bf3269ba769ea2543ef7e74ec7b4cf75c62ea4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.20-20180825085631.tgz","fileCount":352,"unpackedSize":1180368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgRpOCRA9TVsSAnZWagAABcYP+wZK2NGN9BgEw1pN0WJB\nqiI8dDOmpx4DXl76u1QEGbZVUzR8zsNoZxjcA8ONTLvMfbXvCWXn/c+wqukA\nZy1E1bLUqChbr26vVl3uEKUeJBuS01h+GLmbxK1vQSetaY0EcTfezufoQOFr\ncfUeK5w3kHnn0q2FE7rLdV/HBskjTSdLpSykX8FmejLr0sX2/ZFmlscrFeHb\nTMpWhhb2bX2CGsR2LG1sdpC8wE8QdryVaEbXmHzJApwTdoxioBjsc1+vJxuI\n5gpnKZsUYsv4hnAhPUoMtBW8gUrs6CbfHzvT9XZGnJZkHmij3hIVx0NzpMfC\n2ktU2Y+Y2i+yOfArvJ5qmzYRgosHc7FG0gAkoPgcF1svlugBHRy8eTK+mVdV\nZ1BT1s7wrrweXlEbVFF+bG6Hwm1z+hOSNAsTC4vdgYG+MecW8fTkyPwhA5g3\nztLY/OtAiy+pD73bhjOoUBC/gPbAcyb/TthSl/MFVUwOVP57b25hSFr2j1LF\nLKHrYT5heICLP2dpfEeTJnw/VznSRnXluRtT/s6mNMn58Dc2FcP5YzVl/fV2\ngq64CIEA7sPSGLVal85F5ukPe+E9bUkm28DqwQZBcU0Af+UbkUQ2v3gbfUpL\noRwfr85DITcEFedV0x3LYCC1c/+9nugNUKN9m6dTiFPsB0vghWqGFLZOwzQW\nAOo2\r\n=wfCZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGpaWbfpwlN0kjKWsqBixfe9OC9m/rwNN0I8EtxGJltuAiBdBrn74rIAAvRLpoDAtxwUspymRRhjKKSYu0ysuj2UuA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.20-20180825085631_1535187533874_0.9374203600632409"},"_hasShrinkwrap":false},"0.1.20-20180825090214":{"name":"@atomist/sdm-local","version":"0.1.20-20180825090214","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b3ab2d239a63ce76d8755e993be5b9de01f83fec","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.20-20180825090214","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-VxQEgnqtmTX6sF3KeukZWCx7ylBf23Py8YROIYYbluj+uPTvCNGdn6LhNQ4X9h7IZkK8NLjYHvjVOcunPuaQzw==","shasum":"59d18939cf9b321591e45bd105645f5c1158bafe","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.20-20180825090214.tgz","fileCount":352,"unpackedSize":1180373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgRucCRA9TVsSAnZWagAAMJMP/jnY72URe35Q9IRwXu5C\nkeXJ/nZprYSdDlSY5V1Y22Ap/oDt/FQsPvyGt19Auosptab7SFQL5LryzwzK\nV2+Qbsf5llnJ/FCwQ4LuH4fKh3yiygiCz2970PZC+EtQbCS+XsF7FrxVYyv8\nvOVFd8dbXlLTMBqtnctKZ7O9cNwoNPFZ+3adXsqVq3AG/kKi158KtNQsT/r7\nGNBQD3PtvIbQ+z9Iz/UuU+9IGSvopkTq/9mOswLwF6M7rGcaKYGZONuXKo4E\nW8TU7Zymo6I/ixHz3KCW3RoudRhmo1rD0eY9z1XTDlf/pI4vDifZ58TxAwgf\n2pNyy9uzuBiyrwHZFmeDmkv1za6Mu3TR1dtPo6lZoW7fq6FNLdF6hzc/2odo\nYzE2rb2THXlgGZnhAV+orUJUoriNwBt7ZXxOuWb3ugCeV8r6eDB8UBcojF0j\nX5Kca0C/5Kjxp3Lqjq4NgArdH9HzLHsyCILkVGGHfRHsRJd4cxJQTc3a7D9H\nzfQYpt54rISJLb3SRcox4GLZ1R9dRoK2mSflO3c6utcVqqvqyV9AJMXPVsen\nr1nhPCtDMmA9UqRjEl5OHmyJN5Zim2M+hkdCh9ty0dvnjaZ/WhUB7knxcRD1\nUumwQ8rx6ZFl2X+wcT9FKapm6E7Lu6CNST6v4wZRYlfpn82Ip5sm03WQeE0+\nhIjp\r\n=vFQQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF686Qr0mb1UftMUU0Adx5Z2GWjhNDqODXBYS/Ie9zkdAiEA2LCiO5gCSByuemhMBlD8P6Np2IGl1eU6WAMPemwcAJo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.20-20180825090214_1535187867723_0.47857080806665864"},"_hasShrinkwrap":false},"0.1.20":{"name":"@atomist/sdm-local","version":"0.1.20","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b3ab2d239a63ce76d8755e993be5b9de01f83fec","_id":"@atomist/sdm-local@0.1.20","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-bpzRBW6zCApuqYhlCeXdwVeikDf4E6Tyrr00wEmkPNuNcqNg+XbxnoRagJyunYkBsNKKkMNqyMvIxIYn3DxIqw==","shasum":"194257a78a884c54b2032671a79ac8795f570800","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.20.tgz","fileCount":352,"unpackedSize":1180358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgRvRCRA9TVsSAnZWagAAR1YP/18s0meXi3IKEWiVeQAs\ngS4sK9VW5V//MwTQnEdef5m79dJAe4moWj+jWuxNwiYS5DK8swk1xnhDPfke\n437vddtkDYbDE+Ur+INlHR1qsak5a8i/ICiO9kHRzVPu5g6/pdlSStJZ4CHW\nY2sAh8L7R72uj92abdMY0KsT/JuEzkfEXT6RcpQFrFP42VX6XpgJmYsXoPG/\nm8E3p76W/BrEW5LrU0CcxHDxCUyYimPTMFbAQZ8ZCcugUclj8lzuV+7vuPxN\nzSDUnjnyShQmgNOqX72yfy6S5LU4SJEaVeKPnVpFs6nOyuGOzWxr5jXTS7/Q\nh8ULelGHcK6iprPwvWFaMGTh1M5XWEmu3ntJ4cvIng0Nu4HQRgacJViLJBal\nw3G5+ILH/LEmIC1VY7y6dH1zJ3cd6HCNcMIQF2l87cZDMMzhiDS+/wQCRzFn\nJj0oeTJaYhKY2pjBYszmzSIujxnUCcMMsyInLUV7iYaF3/FaKMWJXyaY99A9\nrmDfl1E/CyVczFcU1BpELuOs/5t6ExlbzMDOInXb5mQ9w2VMEEdW5ahIkmGk\nsTSuKUhZEwBvtpaW0zAwNdQnabJmUNqYUtd1sPG6barNKROmgciXWKQ5GReY\nEFl0TC5KuIC5YX0eEu6hNLVcpZRUMqW28JbpuP+36vmKmodpR2SOVWa9lm5Q\nATJf\r\n=Dho0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYDEHr5x1LfScEscMkI4gNMNOI7K4QXiAJoqoKyBVxkAIhAKulwf5uut7vzD3t7+5lMcgobWJHW7QjthinGJ0+SIAI"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.20_1535187920597_0.28573267350547193"},"_hasShrinkwrap":false},"0.1.21-20180825090613":{"name":"@atomist/sdm-local","version":"0.1.21-20180825090613","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"e7256bb583fea4bc5ca9679897991f01a407a316","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-20180825090613","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ldr8Q5/FJS7a89dZD9NGKb8qsCl/X8Np+o+EVQMzpJjCAnVoyxLGxHnKDnTyAdQpQXDcnNrGEpkUyyByxTj1pQ==","shasum":"284f5790a5b165827bd88ffabe66077641cf61ed","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-20180825090613.tgz","fileCount":352,"unpackedSize":1180455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgRyHCRA9TVsSAnZWagAAgB8P/iYU7wcg99o3PYYLA4CW\nRsXAvOdUIPyM0nZeaqbfZa+O7g9gp8HWTQR6dmOvNXzP+Sd9kuRpHEMcRIr1\ndOx+atoQSWkhWHnAAwnALw/Bj/txtmLlSPX9EiC2ZKh3BeKH9lSUtliXD420\nTThYI2cLaMbsZRb0o56kh64/3Dz16j+shM2lh4lFUWWsxrU9TM5tPVlNZnSm\nvXHOHM5osMuSyqFizFwQ/DFw981V2EVZqXSrV9BjdxNM1Fl/tG7R+NPOSIp5\nYjgHjf125a+NRmVxG4qBltHilBz8TsiHbkuIMuGFzlxm6hn57+tloeKC3Pw5\ndUJEzSMaExgH/TVfla0KuWl2HGfaRrQh+dkd8nor+R+hCBQGDCswHqv6FHbl\ny7P5QfL/tR7vQzZGzNPQ60HZvMI9wldjoBsm3tRRpK8LM1k9xtXhxhO33dRY\nnUe2KzU7hclNr1Hzb/Hnj8XQknfi9u4QM3QWYJN8diQ7QEDZHcr+qtgGgaUz\nxgInyh1Z1+ES+bUg3ngCTLCsQyQB0aVAGy3xVY/FpvL5LBuiusg3w5uuDwRf\nBw/vutY1AI09Yb2g+cZ69YcETKm9axwESyNNG8Hkh8YfsUcbb9wGTwpxuQFm\nyipf0DLICT7ol4slSc4EAE37Cb5PmWRTvdUrAStjhf7V1d6y60sK7gAFiGgy\nn6zk\r\n=B7kB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGzm2d3OA2qyurAP2MPWeFAB4+Dzkd98NTTwErCOVgpgIhAKB+4aCaVZE9PxiR4KCNcXT7rz3QW+CjNupQUmSO8U1O"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-20180825090613_1535188102591_0.7946691331003846"},"_hasShrinkwrap":false},"0.1.21-nortissej.outside-of-root.20180825204539":{"name":"@atomist/sdm-local","version":"0.1.21-nortissej.outside-of-root.20180825204539","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"8462bea30a664abaddd8d84b979ab33856f9e5c0","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-nortissej.outside-of-root.20180825204539","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-edBsiiNjk5jG0zkjXDdu6Bjks6rY6f8vIieWLzFtQILTeoywv7OrLwkKxMLpDOK5YYqSaq03YK81vBW6jnO6nQ==","shasum":"e7cfc66d0ca55e9ebd04b25954f63c73ddc51930","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-nortissej.outside-of-root.20180825204539.tgz","fileCount":352,"unpackedSize":1181392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgcB5CRA9TVsSAnZWagAAiBEP/iEb3vBJMGyDEEInj3vR\n3myOfuvdyVFuTku8HAhlqcINRhc/KfMxYpCTg/J7K6HI3tORtnoexPbFj3MF\neW1pSGazIfPWgXY2p96ALXDWlICuX9vdgsEejavWBtKOQuJBw5c2+6awJY8w\nA0JlZNSLiqrdgQh8QNwl2fwRBipjjezoXYG9fh3GWeSiSAPihfU730SSePCp\nbVU9d6xbeSsiPD0IHcbxeRIfQBST0oVyBn76rp1W86NcqlJhTFt4MhqYxvUi\nRCQpHkjNgZUMjILL8YtuiY139fyy6/IsHkbW4lZ4WmWFh6q1hcfJm3hc8fQD\neR+sdIZwkmruu/7izBGXcv0oYJCN9/bLC7Vfcc2G+oHU0Dw9P6GjLlH2SgOb\ne7KprcirgB9Y6qdD0AYNJC2smk2F8yTYcHx8uHG+w1vOIyl47kNA+8ktilUa\nB2TMLXZHYOK3eDHEjyBF30qJFV0zkm9oIvbhh1DUNSXIhrrag52xu3DKyOYs\n7lf0TngLd0e15g05MyTmFpD83h5I3Ljad7IFxmPDO5/5IJFMvOKPugmg/b/R\ngwCmapGDZFdbx5SH/mnIdZ08vR23xW+LIHsHb7cFnj3XeVgfhqwMYNAvFiB9\ndJhKxQFIHKYisMpmOHhySCNFMtyVj2mBg3Gd9Down3r/biMccqMWj4yvxWu5\nX4LG\r\n=Inh0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEu8FSkuFr+l9PHemixYBccA5OXz6o5USsUYVJt47CL5AiAo13YIt62SLmvBDBPSWUS25f+4eADeRJKNkeNyVr1gDg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-nortissej.outside-of-root.20180825204539_1535230072767_0.057464502424111386"},"_hasShrinkwrap":false},"0.1.21-20180825205410":{"name":"@atomist/sdm-local","version":"0.1.21-20180825205410","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"653b08067bc13ef0b637803b9ceca799b9bccd38","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-20180825205410","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-HQzQKQF8n7AxXtmrqP1InwB3E8b/yB78p0Zc7FLmCCai1AE1dUwyA4MAEsoZGvElZH7O/g1QzrzeF+qlvdANAA==","shasum":"78dfb040db25a38200d32451549915f5e4e27cb7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-20180825205410.tgz","fileCount":352,"unpackedSize":1181366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgcJ5CRA9TVsSAnZWagAAOF4P/juYjXEk2Co3k+uZnI/c\nX+w6XOLJcNUX7LCgBgnZiRrbyUROrIMyq+w6gAPjFAS85AuZoTlcZv0WNrK/\nl9ByLajGtM5NUdULF+e2SttSPt+WvH48pN8ybdrfn6+fyc5daiQRqm0QNW4i\nkZmqg1EH+hE+511DPCHCg/igQJSVEYQCelxkMEHjRe/ajusfZZQ7y1F9LSyJ\nWDrfeYpaE76J2em0EMzetGWLV+v0StPOqro36uYsLQ9B110KB75Q94iMdfRC\n0lQf9nFfD15lK3OGt3q7fD8TSCDZha8tFQzu8qzk6MJWwvspFq+8aKgr+dzJ\nHOJkqoAPLBajwYE+iSVOCcCGEHkneJ8i5LDPqQoiOIMNxFhmb93YvijYrBGK\nnNbcoVNZasp69mcDBxUabjB41d+2jIo5YzakIi8O+MhgrhASNUX9/xWYL+3l\nk5dykg+UE6EjHaiOTlJJIXHodTwuZor2XSxbszxqknIoosnijRXG2MSFzemC\nGbdGySKLpD30LGjx12lLK79h8LFaRBl4dwIOwFTixtmkPF9owFtru7aO4JV9\ndrwFuN+d8MVxJkPpzj9yByCdy2pE2DaFJ5Zqu4yygPnxzrui7J0rK2sHJhR0\nABDeFIR952kQytsJdWvQh+p27ltOJUnUopu3u7JRGiI4P0bZpEm4zSxS/n6Y\nfnUu\r\n=cbrE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDrQMKpRRi1SpzNq/ch4NvQX5adVHYO2xBvMiJoYuFHAIhANMsE5N6eUq9qxRV8iHMusS+t7nh7h0ZlAi01PchKKnX"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-20180825205410_1535230585248_0.21809183317237135"},"_hasShrinkwrap":false},"0.1.21-20180826124536":{"name":"@atomist/sdm-local","version":"0.1.21-20180826124536","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"68ba2fee7c5f1194959c93362fba786f860c317e","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-20180826124536","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8APVJBMXaBa/t2M0re7mMrwlA7tcTCPGIgOJEyor7JzmGYBQytlvEXOugRE1WHRDFTIG7FMxKq6PuxKleDYKwQ==","shasum":"f712ddfb0ab3d950cf5364966af87553dce2dd7a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-20180826124536.tgz","fileCount":352,"unpackedSize":1181954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgqF6CRA9TVsSAnZWagAAkwYQAITrlHZugTRzmwpXGiMq\nzrQF/d3ZDgwm7yV1DOqVVcDGIlfM1jzJSXg1a5D92bLxGb+M6/YzRjmEphRh\n4UwV48Fz/NWeIG4LQl1Kq227KJFdI2bCkyMRzEWeIAYPDLhUL4OddAEUocTf\n9fn5ZPBa8oFRPBAfGtBvqHmCfbbOA+OYAa4me0P48gaAj+gwY8zCPoeLZ+kg\nyKuRpTQ2Ihs5+PFjXcA+naYD1xMw13Szlij4RBJNG6dtFyKUW7NoUMt2rFwd\nUXmAL2VHiFZERDxwbhmWhtJWAoi6Nu0K6OTALMZ5JYurGhu6ontVLKSwjA7q\neutknm5ODauq6xWZvfbEDWA9FwLnQefhmdG+43VA6Hm6IBMA4m7lK1Fv9wR8\nC+asR2p4MKEBdj1jmezFes3Yonr3lr92hpz1ggMYpnm07/utYeCm3qzdczOH\nuIPboRXzrrtGGYN8JsapTSeaF42g3GWbRpGOAXZ6gQt8Dx9rwSq29ZaYinTb\nAUEYBrLzO6oXSr8rdLpgtjcTq9+oDho8vJdhQh1ZFhxo6bmN/fa6tUIa0v4Z\nyvrecP4+kpQoFbFOHwBuct/UAXorNbTOIvFE4OkeBTMCtGwt7nFT08K0Dk4H\nTbbKu84I/qPZaOsB8rFTJXaPWzZp8wR0DdT/VGX4XvOr1ytUkr7auAMGpmYA\nMqy/\r\n=Oj3T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQ5PuLfU3WtqEGAeiz/Oa0yW3Yci983AvBaQMNKRpRWwIhAKZ2ow12EN9pw7KQXw+E40GaM2Up/kRn5QaKkuXHFWF7"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-20180826124536_1535287673237_0.8342632644439887"},"_hasShrinkwrap":false},"0.1.21-nortissej.return-result-once.20180827010715":{"name":"@atomist/sdm-local","version":"0.1.21-nortissej.return-result-once.20180827010715","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"33bd7618505db052b0d873ae61ea7d3bfb44ac46","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-nortissej.return-result-once.20180827010715","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-oZMx1G5jGyLT+jC6NUbrHHJeoOSW6+OUv9+qhcFWoOH7w1+f0iZH5C+eIKBAGYeuqoPgl0184LxjXlPqkTQOtA==","shasum":"6bb6ad9ee3caa43bfe681acf50b6cb992656ef9d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-nortissej.return-result-once.20180827010715.tgz","fileCount":352,"unpackedSize":1181880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg08gCRA9TVsSAnZWagAAQqMP/1d0oRAMIDUkCWUpGI5R\nvCCPG6pKqPYQ9aap9UKoXJ+jRq0m1Br0mJtbIdRdqN51d9VDtAwg5cuqmgNU\nn0TGZrSPbJr2zDlyonPxkcwjjgeS+zkEtNdvHwlQrYX/2OQFqE+yUSe9gREc\nYkDqqfM+7eTtMRtsyKRj488uSyN4tGmHNmu+E1dG70LZ1ryn4utkPiTo9SLJ\nuU76xCFFeF+SYCAg/B+8mb51/+ahAirr9HzkEe6bR0qp6jjQpwdLhqYLYVfx\nYpTaApjPqeCeBN3p562FPXOq2XQlMqIQvf/abRyBM8Gs7DYvoQdnSoD4UQBT\n97T7KS7SeH3I+7skFVbExO6uIayB5GPLPEUAjE8ivNaynCZclUQ+wpLcl1Xd\nttpEQMneaOAz5mTZwQiDeifXD2wRjI3iokyZ5Hsuzlc9OrpRR0ykCvvPRZe4\nVcYBeK6qwN+dzZLOx4yD39yyw/Zfw6sv2Mn/DCv1jhNYKs29TSvG98UFWD4v\nZvMrxMbt02lpff8lF/ioOfl/jQzex2Uw9mJ+PJEmzD8beTxPFJAHkzRBnoJ5\npr6V0WF7YB+qyQYox6Q/enHNd4y/Pq7xYGZ/1jxNXpnq/7c3Q8wkMkU9YeLj\n+6YWEuqozoLnhkzrsF0NMcG23WPDzLquSnNIvE0Su6uzIcFqhQXGzAU+h050\n/D2/\r\n=NKUt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE7GWbS6Y2dO0GRDQe5Tj4pC6AUYp1irjGfwA57hL1C7AiEAuPvVqPH8A0/i88RneawvPVaM1r9sz41NDOrYaoH7Rto="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-nortissej.return-result-once.20180827010715_1535332127651_0.655847771250254"},"_hasShrinkwrap":false},"0.1.21-20180827014030":{"name":"@atomist/sdm-local","version":"0.1.21-20180827014030","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"d851402e3354e7adbc3c4dbb60d63f1ec2094823","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-20180827014030","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-XoIn30xhQi9ezRTwpiU7EBm1lRa+L/NiFUIcr/UcqlimsyJQf654R+McfAmRsh0lk2T+DRdVY1gCRiwu65fapA==","shasum":"863734cdee696c5ae2c895257c27907bf8a79af6","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-20180827014030.tgz","fileCount":352,"unpackedSize":1181851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg1b8CRA9TVsSAnZWagAA7igQAICuklO7HXXVW5vcoLAH\nTttv/dSBqBSDWD8yoCd4lShmdj5dsCja01/BjjoeY2/FaR5KYG24dd70SLC0\nJmSrGtMWsFBxnLojnyBrQSJb0fnTP8rRHK5wcc6GJpp+yuM0en4usIL8zk71\nsu2Ggn4+EIoTSE8nRXrq0SPJ3y7d12VZhd/lvpxNUP/YSnaq9rkUxJ5tU5cF\nxKZgNPwdcVvm5JMBf1OXD78Y1rKz/18jVBlkYST0J6hZCvjYYkMxZgaGSDt1\nUpZSGKih1G9LbYrVHgPI+q8AgTzmfnhuSOkYC54YBMSh7DX5lDdTfoe5mCgB\nUMEOPpBl985/pp/l1OrhRIU6crtOzZ37sS9YhkeOAwxbzOqG8yDcFHPLb6E+\n98IGRTwGd9sXaO8+SZeCU5b9xkxH/9fulDVFoEh0uXe3Bx0l6iwIrH2aPi4+\n0zP4t9//eA0PfbU30GpRycggJF6hkZzKmEC4xseKnO9CHpnRrWvRNE1bmXQD\nKnlbscXXtvBcpNnlIuB/RcZpBD0n88mNqRSjFe1CsL3CN+QpQnXV/egPzDwr\nNrCAXrYPY3E4faEaGx3Yj20Gzd8qF+7dY0NC6dBiMoLNQhdRiUOayT8AOhj0\nfzdhjOft3kLr6HralKeBXjWhCnLioHzcZ60K2uBEfV3ddFwPXYHP3CZFvmrR\nYm/2\r\n=thU2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBQ2tI4IFhexl4NmKMDyNTIeuwAxsqE6adaGbK1ntjmeAiBQBQeYYf5LNuLrOymqropxPpwblUYdSab2BZNRgRHCWA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-20180827014030_1535334139934_0.5829254809185132"},"_hasShrinkwrap":false},"0.1.21-conflicting-commands.20180827014432":{"name":"@atomist/sdm-local","version":"0.1.21-conflicting-commands.20180827014432","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"1b6336db0643583d6c9695f44f071a4063ea9122","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-conflicting-commands.20180827014432","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-GNQJ0UlBepMbQmBXVLTi2bkoHgRHobOndJlGVLTN4Dipm0IEnJMzU/LPb1JJpls+F4ZMlZ6yEcn/iug+QoTs6Q==","shasum":"d3ab12ce52a6ec872131841c5a2424f6aa5e0ead","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-conflicting-commands.20180827014432.tgz","fileCount":352,"unpackedSize":1195886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg1f0CRA9TVsSAnZWagAAuX8P/jKAL43p1OISMc9XqGOt\nSB+3A979DHHUZkTWppWmwTPLXDXusjTDoTabtD7XZ9yo8J1UsmOK1ZzieV51\nmb16tJY25KzsXfPnSXqFmhRQk7yvlUhif4EviDaKjKedqJTU+2TJPRlOkcFc\nYBg8MNQO0a5RYxc64b3pbpg2tty0OvxpRnQ86X5odvSu7ccL5dJi6SnojB8J\nNY7gyYy4Kd7NivTXr8dx0Bs8FoBAlgLzotNBE65kKvHMmvimTfk91FfNEIb6\ngQ4ZkY948jtovuEcQpmCe9voPUdtL4pQKOjZ9XIWmpiRL7lrNcwlHXoFEgj4\nxP55Wqa3fkMl5Qq/yC16TMMDkvR26akZhrHj7FyL+cIP9F7pnSR/Ek36IHKy\nCh0lcVCgb6mbEY0FXBfvJeJskAksYVdM4YZ3uMpZcyQ5bN1MLEZKRPG5N5tV\nGO1EEgKYh2ppKIKimTDN1nhJCp7cxTrXVTMYltsSvKz1Jj+rdjNoj/CGUK5c\nJVB0lSgDXqR14vKZXRYyDC11zn7ypszrxxKIvcqRLgMGRdfPMQdTqnf5POyC\nxB6bzxi+/+TFlxoizdRRMxOiGNq+EV7y9AYFKxvgUB739yR+TtazrGyEnjdh\n7Mb/P0Sf5KvgtfL7JW4F3pUikVarxc8kJlzOb2TyrsVnnaizUPbTv/FRkdyT\nRzQG\r\n=PHb6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrNcuofKyNG8LteAnLrh9q25v9XuauBKw4NdISqogEPAIhAPsDEPDRCoUMxCRQuXhFnXdXyREixtTVmVe6d7qGebGg"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-conflicting-commands.20180827014432_1535334387702_0.380616439684035"},"_hasShrinkwrap":false},"0.1.21-20180827014810":{"name":"@atomist/sdm-local","version":"0.1.21-20180827014810","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b8386d7863af2a680396279710bf5b54ddbb44b4","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-20180827014810","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-xxa/k4dCj5bbR3RV1V170o+bHZKL7h8EppU3jxV35X/vBR9jxxbx7IwzyxgcPz2Ve4Bd3cj5jVNw8MSMEjpuVA==","shasum":"7af48f01c41ae7379b507ced8378d3bd96589163","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-20180827014810.tgz","fileCount":352,"unpackedSize":1195758,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg1jdCRA9TVsSAnZWagAAfmYP/j94iy82q4yylUFDXORz\nkzGwFx60x6lCNP0ANWBzwzszCmAwAsOLi76ttPmJUPSg6SbxtSvff0yCCAzH\nZW8npsxDqF9s7Vd/k6cE0tFNAAE5yy106Z0faDu/vf4wbKszBMO78sudBSK/\nuxh9WmZhzyUZHumV5akhX5/2ParUH+UXdIIG2n8WxhpqtgZcwfc+s7Cm4NsF\nuUiTBVzsheZozpjPk57fJh4J85OLpjYTCu/orIEZS8CH4cr0R6wUyd05tZKB\nSujzZnQuDqAC72NGLUoE3faC0bhH0sADIBGdMBrlXgPh3r44pW1oQtqpEUep\nuOYzzQZgnmr12HlHhUpMUCqfzbPJ2IUZIDoTILBX3SoZcteBfOU6w6rFnhbK\nmod4TH32yOwq+Hh6xa67LZg1eliadkKbVgPOqLG+fGh7CTML6MDq1c+DEGfJ\nFILpyjEM5fL8NefMFr7ogN/bw0X0CeTpdbovcx1iS2r3mhhO6TkD1wksFPMJ\nYHN9OLsD1s/QtDTQp3rlwCP3Qwa8NRZ6SKGweoi/6F746k84havgE1yAsred\n3T75dpIED43dwai52QJtpW8i9bz/StM542a5QRQ6xD8KErJy8ci90AtxDeYs\nL9jOAUUpT2gRp71sQ33FwcpxbPJo8TWTsikXqQpN09IcI/uWl6wbhMqdNy12\nfqTJ\r\n=NmcF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/wnQKLeQZFMhJd41nrCqFY+HTOpl6p676yh3d+IGh7gIgYqKFsAb8TilkfMFU8BPvZAj/qm9zH5SulwP9yv2l8Aw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-20180827014810_1535334620618_0.08032287557955153"},"_hasShrinkwrap":false},"0.1.21-20180827030524":{"name":"@atomist/sdm-local","version":"0.1.21-20180827030524","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.7","@atomist/sdm":"^0.4.7","@atomist/sdm-core":"^0.4.9","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"2f7cec85a072022f39a6b756e13fd0ffcfadeea8","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-20180827030524","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-rNO6x7taX8D8stI7jN5vkFnfpuZIN4Q/aSi0Fi6CnAlQwdP1ugI1AWu13/pNyNTMbO+/sMtQrGk0gE2egwvwKw==","shasum":"f2d5878ac75b13e1c1534c5e2f745877285986e5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-20180827030524.tgz","fileCount":355,"unpackedSize":1198384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg2r5CRA9TVsSAnZWagAAilAP/R3ruHHYTfZyS03x6wl2\nU3PCxZriPzWStYWYznNKwmpYEPsFyXSH66gvQZy3h+f72nBUtWrAQutfhCO0\ntcklCTZk0/JmCC3Zzoqqa4oWndDQCWImGnSNqV8y0V86HGnBpw1uhn6GKs94\nFscPlfCWRLzR0q9eIPvgkWfXKx0FfBYVMBYm2lrsZhtGR0KMNJoGEZVr4IXR\nhLaKbRBB1NaM5C0m6+HzGhQpPltNhLlreoBxAQNoUIIECDgLCKAyg4KUlA4T\nYUwHd2qgCP6wz1K+UCav8wxX5shAPARDLTgTnhhSP/L3bSt/e+qOuiKmB07n\n3YtVk2WohlJd56LvVzUVZZKtz9NRv77SdMbenCRHjf5HaLnwfbuXdsEIxMvK\nVtjSEbYFVU4mt0GoQpA3k/sW6kZFcC17hPj+/zjxyBiUyJv0DT+bcA05KLnf\n/oJa63e6/whFOs3pRuVaXKpiktJW7XDpEAhQoqOAc6r/iLO+/Awh5A9v1/Da\nGYvUKzfhDoDXeXSA/wZI+CkxyWdIG8l9Gqbrxc2c1BT0RmeJl2PMFzF8pJGT\nELN1Fkhbm9lToB9jRtSPsiw7lhASAJ1JgmqleijKGIX5WUWl+o25EEIvqrNQ\nam9BZETNju580zZ0wzlmep5nuuzNmkHqXAVZ/rcZg1YNSx3KyN3ztRJ0e5d0\nPGxx\r\n=EkHp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAuVhLmT8YPbEcgOBqkyeu6yZvyaXUEeuCwrDpFBB1rtAiEAy9zzMMH2VrXAlb2rKK7wpIO3owUTn4xl9eHvEXFdENE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-20180827030524_1535339257171_0.6916320130453077"},"_hasShrinkwrap":false},"0.1.21-atomist-update-latest-1535344389699.20180827043316":{"name":"@atomist/sdm-local","version":"0.1.21-atomist-update-latest-1535344389699.20180827043316","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.8","@atomist/sdm":"^0.4.8","@atomist/sdm-core":"^0.4.10","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"bd8bb5905b7b559f5c930a98eb5d75576d5bd40a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-atomist-update-latest-1535344389699.20180827043316","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-F/VJOwR2ShUjdfXnAxZ1iow8Zt4aoLUcINsTewRw1ZCulJ//09UjS9oDlMzAZle2KUQAWnWyrTcpohCJL4zXXw==","shasum":"432e81ce2dd85059c258b8c9c933d1f294018787","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-atomist-update-latest-1535344389699.20180827043316.tgz","fileCount":355,"unpackedSize":1198421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg39/CRA9TVsSAnZWagAA028P/RN1mhXobNe7tF985Jk7\nqFmt4rHjMArnUuMShsdxGkBVgmXdW2pzqIWpFMs5u2sUeC/phN3xZfNYGj2O\nHKd9Kl2ybjC6ytJ/GHJYgCEkRtlkaO/t8s/MP5Xlhv2RP/nlDrUebKL5C18e\nJK66BUVVs+bwkIo0Lpabify8SJRH7IRV4Y/TX4lWMekO1Mtj/mHOy6P3pExZ\nVoJFy6VqKIWSjVosyAYYIU9oxLzH06xOkIasWGKoPZzLeriE0r/IO6RFnL7Q\nVqfcrMp5ViU4xsVMa8aKrtjcTLggxjwrkoV5nfUdlyccjaBEddXhQe4UpHm3\nw3p5GGY7QnKpBzOuMSwZGa2ieZI3hOGstV/iyddYYTbRUxx184hgOMZzqqpU\n6IZk6MAcUnodxzvhuXpcVmZsSTDQooZi8EQ6P5w2A0pkWlHxLjFcSyHHnLSa\n87HaJ+ozwYupHWMWZfr8tjjpWPjVRZB/wWM/Kvx/k8/1AUZFqDztdNngqfim\n7qcJAEYw+qGQECIdYpV6VCtx009chbUFA57GR/WGH9O0Ygl1D5rB00LovY7D\nIedL5CbS/4P2RLBd1hMCw/c89ap7S4pHqB1vzAnEkAQm3Mvmgs+WwsUxUIo7\nlFoc4rdphm8BRNznNLsFP+I23WwtMjs7TJUeJGYlq0sbNEC/e2qqwpK9Z4NI\nYrQh\r\n=tkVY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClbLH87ncYkGgazssFmeGS/JEqGb5oJ1Fau9kAF3wMhwIhALOVeQtwlvOZJiPSsUyAlhOUyCP+KqaIirw7DzgPWgrK"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-atomist-update-latest-1535344389699.20180827043316_1535344510346_0.47872343127472106"},"_hasShrinkwrap":false},"0.1.21-20180827043614":{"name":"@atomist/sdm-local","version":"0.1.21-20180827043614","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.8","@atomist/sdm":"^0.4.8","@atomist/sdm-core":"^0.4.10","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"5841c957bcdf3bed662063645efe836eae7f7bb0","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.21-20180827043614","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jgQvSR8uHg6ET9d1KRZmGwWrzxX/iIIOOR/4ib4awIvFnWZbwG5ZgL4GaZ/zRaXhGadRS7W+GRfEXRmQIhAr5Q==","shasum":"19a9c11896815d0f5ab532872adb1afe1246b18b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21-20180827043614.tgz","fileCount":355,"unpackedSize":1198386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg4AtCRA9TVsSAnZWagAATJEQAJyiV5zizard9gyJJ6Cp\nA/z2cWZtdOe7ItN6v9cdEC6XMKD5GnRRu7mNjm5PUOGLAmZxG/Ikp1kNfL//\nDWi/JTYZ9RIttQacBm41Xz/+vnoAl6qLnF3r7WTBy3FJtm8GOeeV2Vnp2/Cu\n3HJtLOKbWy3m4gtr4YNdgiwvSU8Qg1tKw8a8o1WnWpvG0LZkI10YJZWNmLap\nshGlYYm3Zwdy4MCQfghbCjtQ/CPMhfq7pO+OsFIxqrj+pWjCI3I5BISe7eC7\ncB5Rv7cQNZKDznaPlFmbRz1NUyMi3U6jlr6hRA5Xm/S/lnO07dvPsvQZraj/\n/Qk8oDZhMq4vytwLbf30FktsVoT17kvzF15BffkNPUpA5nlIQYpqdFi5BdEx\nagYoZovsvwROTkgIWea/mreHhhkVtfQ0i6c3Td6NMMkzHlj+LesgMscqphxz\nromRDipKqUZdCk+IxouuVjECDkWYSbigQLmbp/UNFCuyKXWZdN+xzfGbXsMT\ndTO6aLFyI49oeXuTaR8sOBxadpb6ayvGBUEb4cSMHm72pbI7KVFKPOF4O2dz\ngFPuxX9UfI3cTvliZOx015Ci6GoowryKnQz70TP+97ZR0iKLQEfBb6a8aex3\ntuakDpJd+7PJEMMg9YUrQIUVrS0DfeTok5qe0Ezru3VDjqsIxRsFg+FJzhsn\nNDuB\r\n=4TwO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIChWRrrAb3kq7Se+ZNfGhe8wc7ruQlXvakEYUL/XdRjqAiEAwzTbYBAXehY6poJo6HH8l7NQpZoHz3qoYbKT9Rl6mcI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21-20180827043614_1535344685139_0.36629670550788296"},"_hasShrinkwrap":false},"0.1.21":{"name":"@atomist/sdm-local","version":"0.1.21","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.8","@atomist/sdm":"^0.4.8","@atomist/sdm-core":"^0.4.10","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"5841c957bcdf3bed662063645efe836eae7f7bb0","_id":"@atomist/sdm-local@0.1.21","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Dndmo7MPDtRdEuHPdDJJ4kkVyShHzEyDtQJWlyXytd5ESpkVvxVM1TLBrO8JO/jTlj/zDFNr5VddxRvyv+Xwlg==","shasum":"3c311feee4cca4242e682e94e473a76baf8e8f52","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.21.tgz","fileCount":355,"unpackedSize":1198371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg4hzCRA9TVsSAnZWagAA3pMP/3ZZLaBNeP8I902nL8M+\nn61qyIKf84q7AlyRE+LR9ONqAdKQi6VmPzfb90DW3WdbEkjKzaC8ltJbzt8E\nI6wjuAFrigVdzMGkbWLJZ2XPWyi7vUiegbhV2875InSuWk/UMBKlotfVdta4\nIkEiWbKBfenIvjWZYnBnZVjE6DjKvJnql0WnPTmqS+ZKg1n2SIXdHJMDjo2z\njbv+79NfLXe4CzRrpX1pw60+KWr5cFMCFut1gYGtz58gMouI4rVENlmRxSgF\no498J1z5k3FgktUxzvB8nYNLp4Q2n3oUGB6d+XUZlwpkMxoYw6pH2II5ITii\nfDk9LTw4LylrQnbfwUcofmf8Bjxk9jiepst2KlPoQWcVFypB2O6pxVdlcguw\nvOHHVrCOT1ITxs2FK9vS9uhaJLdX4V/X0dqV9xVSnc4iYp89F4wjH/919Vk/\nRDH7dPrSBhxgzrwYpHaMgZz3v6T+YqOfq6tJPIiqeQWg+yNyZpXVJtnWaXOD\n6qiedBOvSG9I05LRRC2VrJh46Dr0omS4T3fvk8ngcGmc+nkkTEf0rmyGd5eR\nh83dV4rol3LgrDAc2PfMlV67FZ8OpZmbm0nieRTpRwLFkIWH5tHvFu9oKXYo\njd0uJZoieqDYVRcw+l741w7FwG2mQbgVH01hkj0xMRUkOCG7cgqOVGrUfsnC\nIV1f\r\n=21ul\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGa/2IR6RxEXoYsXzUrJC6hXX4TxL8vpaB3DEGYO6VetAiEAkH+MYMfnwqWpvl2cczrxCO+fvDnYr9dNXNFXX8gnGdE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.21_1535346802575_0.49579799316012907"},"_hasShrinkwrap":false},"0.1.22-20180827051418":{"name":"@atomist/sdm-local","version":"0.1.22-20180827051418","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.8","@atomist/sdm":"^0.4.8","@atomist/sdm-core":"^0.4.10","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"a27613cf688b2e6231228bf3f153b79df1c32a34","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.22-20180827051418","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-uVZoVoJMavZ0tFkpjX62NteB96TsUHOrY21xJunAgedKvjhoxzf5v5R/e25o+9ro+sQ67SpG7NctBwC2Piq2uA==","shasum":"534b1c3047b055e81be29fcfbe17f9ebb9374e40","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.22-20180827051418.tgz","fileCount":355,"unpackedSize":1198468,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg4kwCRA9TVsSAnZWagAAmUkQAI0fzknlLjRmQIXGA38v\nZsjUJWlNwHgAhrH0OwvLsecW7NSf7GlLyzrGfviNNDqqEzdif6ylYXeVVPhX\nv9fYXosY8JY2GYCFCHoTwtr67kJW9CZRRFsrijrT8A6RCkPpiVfVwAnfL6HB\ngEm6DBZVhvOYV23DFHyUT1TG4o0ysGY6ngKyUIxauyZ0t5UE5mvoZv0OMw/8\njMraTFFrjM0kmf0/ruPR2g9zceSAfwUaTPggrKPp/wuxRgGc4rvhx6UT2T2w\nhY/SqDwrjEcNoLQOpmVwIb2TWCvO6yd2YRxhgjxejN2Q+gdijZQ8PW7EpoMJ\nSL/OTG+BNx7FHb2AGKgyvVRlLianmHUB4jSbHHSQDN2ss4IMoLRNgLqJXKco\nUfqIFQoy0B9H7YQTU3BZW+6nA1V8D8TAhAzgGC1ECBI5Emd0GTmW4A7kwUHP\nLUWg7XTXwcjQ/Tzov3eUB4JS9yFFg2Xuk9Q6PRVL08xaf3hjZZx+VGYeh/Ex\n6ca3RTjG4o+lOjFBC4ID2QK2aUo6YK9ONj3ZQOLFJdzVLernvYVikuwTy/n8\nYDP20o9Mda38F9Smr/EKPRIhXTnDiXfrIK1iAPx5rXYqPBe0Gnb6o0Hl4G2N\nZSoIET9M3wOEJguZxrPIXb2a1fFrqwNHTPfYNY+xYW0s7jb2f1gfyBaDaOJm\n2w0Q\r\n=bx7A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA82y8TPF+sEsHrv+ANViH0rRRLReKYiAxJplAaukzCOAiB7YeVeiPqnoOF+oGItRkJcAUXfyvAOqdobVlhKZJd9IQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.22-20180827051418_1535346991733_0.8997582497189311"},"_hasShrinkwrap":false},"0.1.22-20180827091532":{"name":"@atomist/sdm-local","version":"0.1.22-20180827091532","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.8","@atomist/sdm":"^0.4.8","@atomist/sdm-core":"^0.4.10","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"0628cefd93861d43c01dacd69c857c09d581ab2d","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.22-20180827091532","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-l5DIQv8v9zbCurf3DfGIgkDELC9+uIfLahiwXp09GMQ58PwIptQalQHiOteJPXUSWdDCgOSJOQQfTuT2w02KWQ==","shasum":"82fbbaec22d79790588c176350d5aa1dc3e03ddc","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.22-20180827091532.tgz","fileCount":353,"unpackedSize":1196892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg8GwCRA9TVsSAnZWagAAzTMP/1TngvTEGZd+3lpK8xS/\nqNvZlgHAKJcS/74tFcTpqL2VeF8CZz6+qGHyklgnhAQb8fx3tYmvJ7MCX5FE\nqzuKyznmCykiuW6yVoXKXfSuIgSWsK0rC1AJTtrFVQARgs4szRuuVq96C4KG\nvQhVJS7xyiwDBBt9NIY8TNyPKAKXoCPP+tWXtDQLjOmKdNzNYVUlI9jhD3UB\n53KlRIGRU5oySB52gNQfZjYMqEnoAkk7W8RIVm2jMubsr5rvJb3NLvN9vB7Q\n3ygxscw4Jib4Exk0IrLZzf4sL7wak3cY69VvKIdW+VIQ9OltrScXvb4KPNMR\nU/lFl31NzyMNVnKhUX/i41oqLQj0JSZ0006COvdb81Oo6sKENEzVqSkZ36Ko\nYBUqKTe0NTF+oaNehx+wPaghWTnIOTWdszjafkfzmVbT+2rT3w7ua+zoY9a3\nJvfPJjr2DaxXPBkhdAXm8vzg56etGMaA4iP723edt3C6zG1RP7EvxDQRifXX\nMJrZdCJRShqirnkg4GLdtlu6hfNGLhQ/n5YfP6iGEi/PxcijhjIAWtgAp2SH\niNzJjqYjhxl20ienY7gLKibd/aqgd+VSWSanyzTFA6lV8sS5VFqOhtq5u3xk\nlKr7BYclK9M7wkg6ON+mMYxT0eiLNqdoA3RyJMSjeX0oDo3MRbIJo2IAgWjV\nG8cO\r\n=heQT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdkUsg08DNCFpJPbxMMmTaPxFuyahQC9Dm+/Wad1bVoAIhAIQepp+y0kmhWG7TqzvTN32cMbttqzeL2lXIi+B6F+0Y"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.22-20180827091532_1535361456020_0.3138998432525024"},"_hasShrinkwrap":false},"0.1.22-20180827092919":{"name":"@atomist/sdm-local","version":"0.1.22-20180827092919","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.8","@atomist/sdm":"^0.4.8","@atomist/sdm-core":"^0.4.10","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"db5a963b08c9fc41a3604340034f47b6c542c024","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@0.1.22-20180827092919","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-hm3I2NDbD+qYBvPMIUf9rlAjqwVxhThqMeRbFp681JNH68HY9r30efQeeORvkTmrMvNaqIFNpRTNt48eHbfNXQ==","shasum":"81a5c72c7986fb55866cb018ac2a96e46acc5add","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-0.1.22-20180827092919.tgz","fileCount":353,"unpackedSize":1197966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg8T2CRA9TVsSAnZWagAA9gEP/0q4nJECnUhGZyChs7MW\n7AVDyW/bJi6TLFqRsZfP2gXKm7utJMvkY8WTIu/z061GUVYVKqmecYuRaTL4\nM3iwm6BUeLIrE3FsRq1OaryW28f8+qKa0CkY4lh97Q7PbsNUU5vlitg4fJxY\nDNo27ER1apsbnkuqTiVecXmal+WBgkBjvmPxbMVdaW9aNx+ADMbrumWBoNFS\nfn+Mju99ngGE0ERYcBsm1GqpoNBNDEDf+mbTE36pK/ds3gyhnyIBC/Hrtndy\nrSUiHazBlKGQpik+lI2Juw2hxHsVcSQX6YuH44+sNWgRb6/f/N9DDZRRyNTR\n5AxoI8hOmAqCHwLh18o1cXzqw+HMvmxPRrZsgEQB9AAp/VI8DTPTYN/4+fc7\ndPt+7Jie2RxmHVjcusdNUGgX26S22hQx0qMagu2HMkY2dWJqLFoCyt2cdZ60\nq4/9SpJpdIes8GVlLIOZzhLFzfYU/5loMUsvsfGNrLtYDC7vhZEI5p7+eiqo\nBx08mf00ET4OKN/BgDfxY1wdJFEhwwCz8iUUGrsmET6r75++n4F7/C8OajaD\nkfwovM1tS+Cnp9YdsKEkholv4yA1lTwSsVDGTlM0xP5xpX9rpfF2lyeMkYDh\n8snjlZwbLrsx9dvoLbwd35hRJH+A6RRGUcbjVXd8cpczhrPle8aZTQCsIfa5\nQGyD\r\n=XKu0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDmgWDPZY/McYVcBNEVexmEsItuDamJo2IxK0bY4Y69cAiAyvImMb5AtxiZwyfHuks9QC/NvGPCMFAdQkxt20Q7yWQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_0.1.22-20180827092919_1535362294323_0.8015535340831097"},"_hasShrinkwrap":false},"1.0.0-master.20180827115930":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180827115930","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"^0.21.8","@atomist/sdm":"^0.4.8","@atomist/sdm-core":"^0.4.10","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"612a4a14220799d9fa40f99249f85c8a086ccb71","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180827115930","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-i5k58xRMNi/oLIjZcKN1g731Dxfcg99ftIzoZDb3YwcR3p32wMn09bq9S+c2pBXY3kp05nZFh370Fem5tKOJJA==","shasum":"1b7943c7d06707e0339bddd1d918342090af7f14","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180827115930.tgz","fileCount":353,"unpackedSize":1197972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg+hCCRA9TVsSAnZWagAAaIgP/iDc5AnkR2ZBgnI0pXFm\nOdk4fGECDeL1+8T01qKFYunn7mmqXAeog3lAlXLIjmXFNGPirBf+RFdHdm3u\n8653037/AcbPXXldZsxmaTNTnLL33mWG9J9CuLCtpda8YLXr2bt9naVjxOv1\nsJIZ9hpt0QbG3YGmLZoB6YgH92PdIioDFWIhi9vkqebJaUk6u5z5qB0xttfD\nGfj/nLVqkTzXVLC7elLs122UXbrLDFpeMYcitrxmnoWMdRvEjX1rFuMyTb1q\nq2scTdSc0GIxJLpcBcyUV0eA6mERidXy2HVvwWefPgbqdV9z+ytzEJUYHBv9\ni5i2HcyxU7AAh3Dza7WfQwL+b6XIfCZBYnT8+wOhgHH38E9e8tZBuGuQllQo\nD/xaukn1HqCpdycgYdlNYYXO7AFPArr+i2enK3dTyt49oa5U9IS/bbgpMkes\n0WaHg33OdcL7M2oMCo4t8zniubBMKLqhmFjeW1Ug+3j7f6eK8n1U4JVepl66\nCcJf5SaN6UOJn6DKApSamlDH2pLKeG4CFWoGJJqSVmVNeNjkTDrBK3pXIu+o\nTa3t1Z0B7I78DoFD1E/+XHmNWk/SJhO62H5geDS0fq8PuWjLLHbNM5h/iVf4\nd9TDHrjeyy6q70ynFFukCrMlCyg05iN6FfBU8MNguCt8kntQp1d4LOUAohuw\nsXyS\r\n=RiVL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHCAmp7xvbtkW5cuzmQN9hZ+P8v+YYEuaxC9rmapXMSwIhANSn+ESbvKFvUG9WyGYnyqJWwLLO+tYwbe/Mfp/J3I64"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180827115930_1535371329568_0.3936941226373729"},"_hasShrinkwrap":false},"1.0.0-atomist-update-next-1535371237623.20180827120043":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-next-1535371237623.20180827120043","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.1","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"9f8db954fada5eb9733d93517eae6a2e3af6f212","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-atomist-update-next-1535371237623.20180827120043","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-IoDtZ6j53vo+0bfTxWdtPxKZCKUQ3YM5qbyN/zMZbcYQeVAKtGaHduGCGAz6OarCDp9J28illb1VQmEKLxT4fQ==","shasum":"93e35964ca513253471c09a4b88981c2692f2934","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-next-1535371237623.20180827120043.tgz","fileCount":353,"unpackedSize":1198006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg+hjCRA9TVsSAnZWagAAe0EP/jVwQqWZeqG8odEl240K\nsYGOKpH6HWFFnC9X/bb9QIblg2cOhPwGZOb9VMQbdZgqzNuJBhC7wkYILjuB\ngmEzrIsTvGLJUjNMbSRKLIoc9334XwFsB/ShOiGlcH6euumHR9iT7lARH0+R\nP5+CKZGiavg4NmYTNNdETu2PnjclUxKQq7HDqvTUX91/0kbYB8dK9dKjWGQY\natZ35NUjM7n/Jqn95cvQ71yeLx4KP1rPE7yPCl/uJiZlTQXfrw7bLyIdw3Rd\nhfkTKgJ8V8LjLSiEKmSGsImk7hMDdSiRXK0/V7zOGoyBnpx4Y2rFH6qtYiK0\n+aaN4TTpa2RMMvL5tF0jTpCvnUPkj0Nt6/PcJp+N63j2E1djFzQ9JHLOexPy\n2YUdUPu0jZThfHKqEufrB8AKhtqal4k6aoc7sAdDEG79ry+PwjxcetOuPSK/\n1NjuYx/PUWi+TrcM4am7G9p3IevBr3bQ8FDa5PCDoPgq3ivemSX/2UvJSaah\n31OCAWTgZ6mvK2FUPswZhXwsmwacZYjKX8QioxFdgscNl2sw70GKAsz5t9OL\nuMrNaIGpEfEmC3AQNkhiKDt58dusXdpSD6/a7I1sZngBUn6wVb0uxZ7yr4FL\nr46VarkF1DpRPOaX1BNgJKhumCc3wlfueuc79JbOoGZc1a73mohVO/9Xzvh3\nucBF\r\n=Ragk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQGazCi2hJQLyZLCK5CzGNbLWj8S/v7u3VDdhhL0EzjgIgJobl6+Dn8FWcKDSyP+BOm5I5A2iFAFsCVGUp8Emcjfc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-next-1535371237623.20180827120043_1535371363050_0.010027269590933585"},"_hasShrinkwrap":false},"1.0.0-master.20180827120350":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180827120350","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.1","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"fc9b105115fad53ac5dde9bc4c46e62bbf01163a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180827120350","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-zGdoSLF5So9EH34MdrrwujF45vP+O1S+NpBRIom6bZdS3Hb4VtOZmHsmDy8KByiHrA7r01y3yarDtGKiNqZkWQ==","shasum":"44aee632990c66760024e3fc4f08908274056ceb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180827120350.tgz","fileCount":353,"unpackedSize":1197989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg+kdCRA9TVsSAnZWagAAOJkP/0UT8htAk5HI49S8YEu+\nMJ7lwfEzMs3iZ78VM61qonQROlx8zZ8zWHQ02yWtWyzUTPZd3eVIqnN5G2Sv\nxfxhmwo8jQOhZBKIDhaTHtTG3twrxked1xzkvubjYGNm4eHCA5g6mjv9ZTU1\nmDHAi+Tsvc68C2As5A1e7mD6CdYxJLWYIOWcpZxt9s825jYlnbogwTIJU0SP\n73g6ZHLeqoN2TVqci6lVsulULGueBt9syM+7v3czDFSUcWmSDhuni7OVSUe9\n0Ek+NSDnT6sLW13rHCJk1GNVG2gDLaObKih0iTHtYUih44JQzzDwDmOQLQLU\nrS9VuNDXpnn+7z/oGfLJSsUwucnpnKR9kKBXxtXVNKZJq6ZauBuAofBN6Pj9\nTlk9aKeOyWQbiyjoVjEX5KdUOOYX9K4/lgCdzdd380vqW+AWvXBQtpKgHo6A\n9GJoTJpbkusGc6YAHHOpr+O7NCjIZipNg4YZTUDHaz6xC+A/zrhyLtxvqgOp\nzKaSGcdYDjupxN5O+5Ji5LlApjEVxHBM+zZoF713zat7aIeCr2xP1qRbhKmO\nY+QEWIez147U9QEPNv7zODXzcuUhmd+34XG+sZlACDTxaBm0owPO+QS7nzty\nYdyHtprSMzhNjkvH+xILIDOZmgULNOdxZzQflfV/nfN91+OW2ijuuJ7VLwv8\nbKW8\r\n=2wOz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiursJnutzaedLnzIPkgbdOmQPbbQcSp1h0dFz7w9Z6QIgSTKTlgQfOfjaUSdLnJfwsYUm1E0TuLr4I6OXaJ/4kAQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180827120350_1535371548783_0.6560242621101335"},"_hasShrinkwrap":false},"1.0.0-M.1":{"name":"@atomist/sdm-local","version":"1.0.0-M.1","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.1","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"fc9b105115fad53ac5dde9bc4c46e62bbf01163a","_id":"@atomist/sdm-local@1.0.0-M.1","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-olccMQ/l8SpffBChlBu5WF7riFjo+MWyNid2hkWLhpm488ph/ENEJ0F9n4VBicHyzmmEm0gS+Nqri6rVARimpA==","shasum":"0b1dcf7b3c08afb8a6ad345f77f8abf7acf04144","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-M.1.tgz","fileCount":353,"unpackedSize":1197971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbg+siCRA9TVsSAnZWagAAgQYP/1hvKyugtdELppJ47j4s\nne7Z79efdGFLpGLqKB3bpus+C7v5nAY8uXgQpCkoBZXg4IBDHF70WBiuzheL\nDpn9sHIr9HN6uP3woncsKFe6K5EalrYiwaX8NK9yK1LrAunSbCio8U7XmFNU\n/qfobSG9aX+bSGcUB9QaLUWg1okgoWYtS+qr2GME5SqdBtbrk3pfCPxEvLwu\nrOiVlD2DgkAG5fd/MEmRbR/irZSaw6vBAEFUOzWD9C57/Eky3K5jf5n4Oddn\nCf5+lHDqjkryZlIuBtHJpNVTgsFRMtZ8K6bGeLv9uLlENUAOy5oDLZLwkRge\n3MDld25jaYAlH2Mj6M2N0YOyu/c1gziHSNS5Cc8eYeHOzv9IT+B73HA/CPk8\nnI0kXrlaP30zg7ET1KH1N9RDoxEBATggHe5FRnPWxO51hTx8uP4f1BSblfDf\nluRvlsyQlhYkKmHYUARhJAZEClj3ZFS7hhGFPXYb/if6MbHqKAE8yYXXY59u\nQ7ZAM4ggeu/9+3JhYeYtvXePTxhZW7TUFfHTh+IM/vUBJOxLpk/LlR8h3Ccl\nkL4jizG8irO1Z+W8ncnQPVobBVE+Qe+L4sFHVCe7PEbuiL9baWluNzoeMz99\nUQwmt/y8rl77cDAKzdejLesQVD8zeZe7KLDsnz/5TotcZbo8i9UskUeKt61l\nj11C\r\n=RVWG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDL8CNKWO/tyG6YT9v9eKkDPfefpXKT9xvPJfGrZ3RsAiBNyHKZSFmbH9J2MWtyUjCalTjER2VbBxzaXenfphLqmA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-M.1_1535372065867_0.7916000603084765"},"_hasShrinkwrap":false},"1.0.0-master.20180827160515":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180827160515","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.1","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"d2e99dbe7c9baa03d583ff2bfb9b773e1144fff2","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180827160515","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-RWTGUlwoFtS/8YT+4lpweNjNo2duLk8AcB/thkW4bgt4nRb+FG7G066FcpSHH+Cfok5RmDFGeKJzq8quPJQpog==","shasum":"9d0e33abfd7a99eec6406d57c8a503e0248ca15f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180827160515.tgz","fileCount":352,"unpackedSize":1198612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhCGzCRA9TVsSAnZWagAAg1oP/AlKrGEeVAozUxwn/jmO\nu23ZkSKpXVwGm8fQgjGcxi+Bm4fQJYosS0cqFBekmnrfUkWwWWEYHMI3Yj0y\nbkM+lTDKaPrQxuXKwVtRha1RBtwMcPkx6lWgkr7mYgmOkVdj3WA56aHs82Tk\nvx0pIyUL+CwJWRZ/jW6RPJ8FAf17cnDdvtW06b+W6k/ykYWtQ2Iv7RDIDUdZ\nd8KX03jCr0VBa3+EBReGjb70+ZTpgEMGibtBP/+djFaomlw1NbxeJfDUhlmz\nhTEeVcT96b3QCs3xvjs2V1DGeUDMLFvjiVgMwyXnQVjhB5fIEruEbewOAgNJ\nyLrbQtPUlgwg/C5VQAOvfE7H8uzmAPrypa6bseBD4XTkinlJZwJYUgx6l+Xk\n52EcW9xgpKSPvrlUixvIKkUz19BcUdqOKvlraJkSIXNdSiU+mrPIOsKPpFUv\nIfaFE39xEspUp+h8chA9V4o8U2cTnufoTqUrbHQWTiCYuQRgSOZgTPc/bnNg\ngx68otP+QQfgtr1WnV6RvTQMgUoDOrtoYG9LOV0GsFg75KY+5OZfSf/YrLEV\nW9weRoTMAF+Lrm9Ro+okSisC4cvl+VUHbheY6eyzKPtZ89YaqFCzLqhYfjpA\n5EXJhysC4N1lYCBuZn9TRUcpFjIyl4YarOk4wSRjuM6huWNcfj2U6MODSL2A\nJHNP\r\n=O3fS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDuqvQAo+J13v60dlIMYjnGQ/ePpS6TKM/mMXKUqXLbIAiEArnvouLFLfThrMblzDjN1ndbC/lmrEwsh9TUNVZs6rlg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180827160515_1535386034663_0.5467565063347357"},"_hasShrinkwrap":false},"1.0.0-atomist-update-1.0.0-M.2-1535388611829.20180827165018":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-1.0.0-M.2-1535388611829.20180827165018","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"ab17bce3cb7ee36351f0290d19b432ce6d2a49bd","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-atomist-update-1.0.0-M.2-1535388611829.20180827165018","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-rMbe5beGGdPMQuf0Lp1q7phdnPePtuiO6WBfue8FRx2E5i+3dWb5GbbSyvIhnG+PrfUxH0wAaFBPQjkLsOiwNw==","shasum":"d48dd6a6b939e556fecd9fb97d3ba3cb8f952d51","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-1.0.0-M.2-1535388611829.20180827165018.tgz","fileCount":352,"unpackedSize":1198644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhCxECRA9TVsSAnZWagAACTwP/AhcbMJUddGucAllHrV0\ni1F9VXdy63pNEY6YEck/8epub9VuqNfvl/nBvfUnH9l7Gr5ohcUSC2FM89q0\nkUWPUZzqAFSzFswyusAnbQ370fC8GFPUWWmdNAr2iXzBJ/A1/Y82I5tA2wzR\nTbuFuXmMw0bTqabbNs6NQbBmqVB8B2nIb2LUWdCtBJWigZGwUrOyFMUVPI1V\niidSMSwgv2OeZ+YQzMD+Ut632bCVyNNwVgpN4KiuU4tlcgE5Q7Nq+oekVNMC\nODf6F+xnBlgJzsiLqSti8ewQIBQ6OOTArZ5HdIuARh0lpsdkzhCDxlkDtfSb\n+4jNn4MD337tskTbvVf3fHAXmuLg+x7dE7I3K6TOQ7ajCc9YUWofMA/cLOwx\nj6WIUecOLazMrNg3xxaQL5VUew6FV6nh/+62pz2RIEIhrg14OUF/KWshDTOT\nbmYHqy6Vu9Zb+iygeChFCxc0jSAIMT8zxz1R/KkzFOvLH+MpbXj0aAdaU/RS\nkXU5VDWxRbyOp0kGGlbtHj0npdV8TapbN6TY1eQYsMi7dqlgCVaC1nLj4BC/\nTihl1sjbiR6ptOouoAgvDAlMlzfA5LGhTYzQut3DDcVfBOSMxMC1vBdrb31f\n7B+xclq0QZtVdQOjP6LbePyAs1n1CjraThLL1W4FvC3Qf5ggSgcve9xcsAiZ\nadVK\r\n=nLJN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAH++5D563VT2BCYrhJROr1wMC7J9PbFwgGEOGNV7izLAiA2rZAvsK70M6k7zdLAJEN9FcMUfIwjj5wsTPGvLMlT7w=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-1.0.0-M.2-1535388611829.20180827165018_1535388739782_0.17685145141006542"},"_hasShrinkwrap":false},"1.0.0-master.20180827165324":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180827165324","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"2edc113c459a682979f9d5cbb615da59167e3805","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180827165324","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jv4Adhxn1doBFZtcVy3ovPt6bBFPqfqJwt5DTB/QIKlfymDdORRbZxSSvDhKEyBccw1hIkQycj9aZNppiCYA0A==","shasum":"a59e39deff8ab3b5ba9fe5a0872c3fafed988503","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180827165324.tgz","fileCount":352,"unpackedSize":1198612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhC0ECRA9TVsSAnZWagAAG+oP/igZd4gj6CXIs/dQL6Bs\n0y6kO5Y37UcfZHX5dhCnHQVsj+7eVKr/EyYWgpKC/J+axc161LvSsbZlk3Yd\nKx2XNhskaSMOcZQ2IHIsdqTPTm+nSWfUm3hC/YGHnysJa8ltNHw3CQOk7Q17\nJUwbJR0gv6irfKsQJScvDjgJhe8NFSOHLb7fvybOqwpZTpS8nuvXxRHtumK2\n5OccsSRMsVrvqJPbBogPQcXDJF5z+K99NRhF8+SvkOo4B6FHNfzb4LqQQ31X\nE9dBLW59o2jDwakW7E1jeqjjzdOuhVqt7DE1zgIZZzXUQmU5fgjgsGu5Cf3u\nRV962C8ljP/zD1gUrKpxPIn9ephX6cdakcIrVCXY+8xbwXaaq2AF9CckdFAQ\nLBr3zyCbJDvUhrbyzVGHjGtd4I7c/3krofTVhnDc1ZizQOpC6qP54BYORK0B\nBCVjbRChcdPHJ67gkkIniPkkFv3EiBOs+MaisfZb6ai5SHW3B0JDidC6IQEc\nQ6elV/2vnDzQqs31IZEpKZKN/qDWvevhOrRLlkoYf4dEwEritzfk1ZQC3arU\n1StV0q8UEeyAU2Nih2mTvwBsTxuktsPeIeY/XDtx1AZ8+m/4is2TPAUjHlTB\n3hd3+DBxnH/AcHuoi3uVm3XX4oJ4TpROvZxdZORfdS6qT08ztR7UN27F5DQW\nnlbG\r\n=VdZG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaP2Wx4vLrB6SjQqb7JBtqtSyq+efs4wFth6fLWFwSCQIgLN2K+dFLp8oyO9grJJ/TKQhAk3wltu9S8+4aT21Hkhs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180827165324_1535388931447_0.7502882663210326"},"_hasShrinkwrap":false},"1.0.0-M.2":{"name":"@atomist/sdm-local","version":"1.0.0-M.2","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"2edc113c459a682979f9d5cbb615da59167e3805","_id":"@atomist/sdm-local@1.0.0-M.2","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dfSfDbf5ut6YICUwBuBtRR9K6Ga/ToI/5WQCaK0j/4RiByO0j91Y7O3aKYWOtZxptLCnIzDvqzjB+51Ur/VptA==","shasum":"0ff3b4f5519c10b924e85aa4d895574ee5878d2c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-M.2.tgz","fileCount":352,"unpackedSize":1198594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhC01CRA9TVsSAnZWagAAJbEQAIjjwGlkd4a5hc0ivqpf\ngK80bc3mdXQJu9fKIycjnuKz0IH2iMGA9p2fsA3HnkFF5OxJcnxYKmA5S2pP\naX5asNdfdRsgtGo1Rq3H4wZUl0TuOf400xz0EadpltPsIW/DHRbmSPXMtVaI\n47/qytxX9ITKZCjU0A5ExaPLdwgMxItvkBCqrbSRLGnrwxJeYdnSjYHNbaL7\nXdoV2ZM1k2M1VhRj18NLrRqTcqMiuEC0X9fSz0yBRJUDW9X0dTP88xp7IubA\nGRmY1gX+SSUleWo9GxKSRbCcZhURKmN1/1/SObZL0dymXYurm+DtMw6SLYNP\nXs09OivY5z/nViZkLdTiwKJ1zriwxIVLypkg/ZM2Bovsu+cmz7eIvZ/ulDAj\ncXD4IwHBvoh1sKUKFeCOWFSh/qIdjZEAJjHT2RN2gnrpLuICsfp88IRnRI7K\ni28+TRtlhoLyCrxUzH9MqSsklWopIXBZdcm08AVzSEOvAm1x5+yeBCTDdkaR\ni2OYY3k7a3NNqfgXLC8DUiEConOvr8Nd8LIAVXcHJK9kfEWJRK8iegiZT0p9\nuhPCMzZbrIbw+JQ+Vdp+HM6hB7X9KoDTgDtpaEZg+5yJjIJXh6Bb9Jee+tZE\nJqMl+bz4S2ayziOhfllu5zM1co+NEAAxFuaarY+5kko8iZlq9/+PHQdHwJRR\nYzQr\r\n=c9mi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIENi1yiYGY1HA7Mulk2cim36+IFHK5FRhM3EOsVrBUzgAiEAldCDnYWZBK/V+YDqhu0nBCcwWgOCD97xMjwWMdNYOVM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-M.2_1535388981252_0.23422397953507668"},"_hasShrinkwrap":false},"1.0.0-nortissej.git-clone.20180827205452":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.git-clone.20180827205452","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"0fcb55bdedfb78b927e1a7a6aa316c6d459b2e82","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-nortissej.git-clone.20180827205452","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-rDodlIaNOCyDce8cuHy8BERfT7rF1lxg9F71OgV3nmNF8ih01ZknWoaQtq/pwCqf3AkZ2BSj00FXNh1t5Y30Sw==","shasum":"324d228467b26e3382a3393917abec9b52208e5d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.git-clone.20180827205452.tgz","fileCount":352,"unpackedSize":1198841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhGWACRA9TVsSAnZWagAAKnEP/0rE4bUVeA0CeVUBUScm\nVnb51z5qeI2pUuvx44gVqzidve3+Ph/tYpRyQFYoO3ZhIO4VNH0Gt5FNIBDS\ny7G1UtmRjdfmkZt3k+yT7Z2KNI/VOEE+GqNwxctASVTjmIttGHzSSYI3vZLL\nvl3RuTQG78SRReknXp/ZCBcfr3rh634JWLIMup0qp3ORZUQJ2OXGcKIzZULU\nC8xnIiZvjT5UfOo5ISNmlGx1NnBk5JaNaM3TVH7QYbLc26BI9efxJtFjOZvz\nCmKWdO8L6+5H32+s7AU1uXm8p2Sa/LCMgb0g1gW/akuN1skkja0HLu54wIIJ\n+gecI+maG9banJgJuRgIIWSOAyCKGN+ZQlwYqOCin/UmyfK1aD0a+YV0fBQF\n+FqbxhvZthdzHbmfwKbzD/nNF8xHwGxvAjo2EqnwzCcgahroYauElGvMG+M/\nZpfMICvjGStHj5UlVjb5J9GCDTE66ZdhMlQuEgCPT/IjtLaiB49/BHatwWsa\n5yho8zUisrPjeMiT2Q28frqOG8b4biziYwV7nWo0ci+QbK9Is6EtekG0Gnk2\nQLHW/uJwcpmYLPUW1Yo6PhK4qsye6eLDCHu4T74fqZuO+up8/+ZIjEhopoO3\n55p4Q1N1KP10K+1nZTmZhLeeCUwAvTJ4s03t/IDnmbvg7tlYxlhVjE1ypSAA\n6jED\r\n=FPe+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsnPLmyMFz9sdK5BEd+q2e2IcP3aw1xRxUFDA46kHjgwIhAOrTTGcAwtWCEySEmYiJbC9ga39epv5msGfW/fOIEEwM"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.git-clone.20180827205452_1535403392341_0.4882263411276875"},"_hasShrinkwrap":false},"1.0.0-master.20180827212410":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180827212410","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"7ecc0c8bb0b191cd29cb4ad10704dc70a1d223b2","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180827212410","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-vY8pIl5yn2q2alSH3IvbMYpecWql4MaH4vII0vZcOzWvDOTQhJD6QxF3odMyumfIwsxT//qeYPpr6s/80KEeAQ==","shasum":"6ee94532e4554af64aae6b07940f06c6a52bee53","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180827212410.tgz","fileCount":352,"unpackedSize":1199040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhGx9CRA9TVsSAnZWagAArYYQAKA79Tg9U8zwtEtDUkw6\n7Zz/XPEUhBiVEh5wiOXTrUTt1y01tbfJbLeOgKuN6hmi563YwKezEqIlPGgJ\nGnxYylvx8UuRw6SkwAZumTgsmgeyMX6PtGjq3JKeYt/3H5OMK8ZMawHFUv5J\n0TZw+OzuWABpCeK3F9FxbqfYT+Ln+1COjmSYOw/WIHGblA21ryOTyWjSNsuV\nzGkFhCSsPXRfK2MySjPEmJgGATYRipAvP3327nIdm1MDPZ/cnVM9a3f3Eh1i\n/d7p/A/HJlckUKYtQrDeFTqtGjArXZMPvcTDxtzq3NzcIebrzjNuLOlgjCGk\n9yNGHyxLZ3GMux70EjeFLlRIuv9DYgQixO4Iz3SJ30S6jClO60bOqCqngKUi\nvneO8Bp5Md9rbKZRXWdl26veg641F34VINNpROi7Ay3RjHp3uv3cg1EKMIoz\nkOtz6y6rq4TwKhMmBo9qpxI/iZdhgTJZW6VlQ0uUG19SmLKi9Sr2qe7r3mQX\nCQNpsgXDQNBUczt485exvA25LYbbyubfPaw7chZF1yozMVbqZB0XGVDeus/J\nNfVsR0nI+LnQmToX33HzkXAm2bwhNchmByl32kEMRV9STsyGKl0Qm4rejypu\nnP1RWaw3Ok1RqIWVm7xYiZ53ic9T/86eSD8EN+P+8RB7jUw8/d6G9Zk2ALMr\nyC4O\r\n=XGPO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkHujMeRvjKocWrZ8XbZVNi4DL+Ohqjul3zlAiNKZnDAiEAyEfI4N8UA/ZfRUXTU7XJPAcBMKZgxueDp1hiIFwoqDA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180827212410_1535405180702_0.7032884224034506"},"_hasShrinkwrap":false},"1.0.0-goal-rendering.20180827212706":{"name":"@atomist/sdm-local","version":"1.0.0-goal-rendering.20180827212706","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-progress-bars":"^1.0.8","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"9bc4ef8890f022850dbebe3ae7132710f20ae410","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-goal-rendering.20180827212706","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-pncesaw094fgTc+vyKqEMGPM8r2Q5sDesc3alrJ4ig2b8l9H0lXZCseeqZXaqn2gmd3PuCgeeZjdAaDWFEWBGg==","shasum":"713833a97a97dc4d8a759584926e01441ae4d9fc","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-goal-rendering.20180827212706.tgz","fileCount":355,"unpackedSize":1217292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhG0oCRA9TVsSAnZWagAAPz4P/RlESMrigQtPjD9hF5VV\nWodbgJ4aCkE2jprAIYw0M5f/ScLDn30KZaxUg2ZLdFcxH3V0wrYA3FDBpbQP\n64ZDcWCRdZJ17ZnhLyU1nxducCXqfNVWnRjAwlqayIwV6AIeqTX6jfV5Tswa\nFKbIzJX/PxW3X44J04ovRRH5jfBoxx1jFWwo9YLyr07z06T9npq5AgFrAWQe\nfaQCPlUCtBhkHSz9qIGp6URwZBWW3vBUd789/MLZjr31zxlEFC9/LSHNZ8so\nL36hopGEzr+WLoxay6GDe4Ntw3jWYcl2pI0tH8SHFA9hj2qQNH8/IenMmA5W\ntE3gEvQB/Jh2XHpeElhVN/0J6fQgWSAkAVvm5TKeozouD4LtyMEUqLEAq4gv\nCRqY/Sz+9LhbV5MAwa8n0aAquyhSsEt2lxs2K9NBRR7KnaeLshO8JMZV3Mo+\n+kpFAY0aHP/k6hGx3jImUlzOXqdm9RgCqChreZdivSRdbQ9CSRxb9iq4mkQ3\nzFoxuj7m/7LaSx/R6WQpho8/o02Dmf3/sX2Ua5VEr9Y3VlF7YrgVvdgbxc8I\npxUic/Z1R4QKg/j9ys8EKU6G6oWi8noALVM/96oaDYF5CH7pQR1/jHzDngK9\nsGN6QokV3PZ64aoGMFXz+zynO+2VMkVuFAcNtqoD75pVTQBJbJr87e5TUzYl\nRpqi\r\n=OXza\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+Fg6jdVCEtq+SIksvQ7V2yOHd2EN0OFP07UOckobZTAiBuSndZE9ZX51mTjug8kWg55UQOmQvYRuL4ifY75TijfQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-goal-rendering.20180827212706_1535405352341_0.9218745855147557"},"_hasShrinkwrap":false},"1.0.0-goal-rendering.20180827222921":{"name":"@atomist/sdm-local","version":"1.0.0-goal-rendering.20180827222921","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-progress-bars":"^1.0.8","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"a99209ec77ce76665131cca5756900dc7015fb99","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-goal-rendering.20180827222921","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-FnGUTL7eqZ7n2SpQuNdgrNmq8pwZ0SrjFDhA3gsTx/Vt/1B4pnto1H3nH2/RBW+et3bGsfL3fsqBn4FjwJei6Q==","shasum":"2e295aaa13f44d7c8c645a6c9031f28d92df607e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-goal-rendering.20180827222921.tgz","fileCount":355,"unpackedSize":1217323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhHu5CRA9TVsSAnZWagAA/DsQAKPPDs7iN8XeoE5UYlMl\nrXz7vKceWddHzKtxoVxKBZHsYE0FyKQ9ucwO+Ex0kW/3g3m3Y16e+rEKBbAo\no1YKT5DPHKEFixaUAha5Hg2K/96D+sqF1qZN0mm2mYu3AAF0vP2g/e+x40lg\n4YeUC2tzRZciiDANTJmqdYmzQT2momjZkEQwkTT/baBMtUKNQuvnXh+wHria\n43tlEGCZZtg/88zLwEVK91X28HH/CwzlvDSV8jZXhj662YlcZaL56JGRt4xM\nR6earBf7hlx7mFY/bHHnYEv3ETA8urJHfnf/k+bK7vBLScDDupi7sXuX9uiS\nRJSPLfp2nwgllbA4hKy5t4jN5ryRkH6o22cjj6VhrCjh35JRsy5SjslV/F1+\nwuGOmIc3ZlDWdacY4x90wUaqvEw1ro0QBGrjMMTFcNXU3DExl+s19YyVjAWp\nC86TFxBUvXJwhjFbm3d0zrokHdyH959TeAAvpGZFej2RcmC/MAkR+a+VfJzb\nwaQzTSN03m8V5BqCr+QlT1wx9rA1CE+MqnLblh50zEuFp3NAdgDzNkyxJKFd\nKqwF0KYTYjNeDecGt8ji94hxWnTvb6kQEVRyIp0H0D/WxSnyP0453IjJNt/4\nTSfS3wXfBZwZLdnI518M42VPjR1BTpG0GyM0wyXks+7jyTOWC4bixYC1iqT3\nPWAf\r\n=ZtLY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCku9SWO640ZUH8t8coyPurJLJlRKSMm1rEFv+J0C9bNQIgcz/6bfCZJ8Vp8GkZA57bjZCOyIpozkMAMsfTE1oK3iw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-goal-rendering.20180827222921_1535409080822_0.6825244491965214"},"_hasShrinkwrap":false},"1.0.0-local-inv.20180828082642":{"name":"@atomist/sdm-local","version":"1.0.0-local-inv.20180828082642","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"23f14af49273de7f707fb56e629c07d766638ddf","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-inv.20180828082642","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-SGYiJVjijGCUIJifTrlPLUtMOgLb4plI8i+96h0iWqOvPMYhMaD1qcPvFangdbGfzR2v/0zd/QdHUKJlpMVlag==","shasum":"e92182a680fe2664433d38a59f4a68fe7a476c91","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-inv.20180828082642.tgz","fileCount":352,"unpackedSize":1199153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhQexCRA9TVsSAnZWagAAPHUQAJ3VHhQlnAFxAtlwJjBE\nmK8QG8m4ikTWCnMmjKqR8v8GIIbvjoTamomWd9WfFfnAQlAn6eemdZu80USr\nHvQYsF0INWIm69ynj6/7ZzCU/vHHx07Z9G9qLRj2I1E7jkiHBcBp8ang38Zk\njjPfg8mguezuRFje/M7xQM6Y668JVSNDYTNNSZFG2vhPPdY9F4L/x5tznMwX\nGegF1cBqJkTuLxnWzl8GJL5E38SBk6SfADreazujomcx+8wnt8NxZTR7nwMB\n/4aCPLTcgPgtp3zHGYRIrrl+8jKcowDaqljtM+lVmXKGS9+HecS7/zhoJG0r\nyBCX6i6O/LFmYuFgse9j+rt1nOGyr41I4ip+sZyWPkLSh+/xn0eAemIBp6j0\nuON50UjpRFq9d0v1Ws9PrHyQjZhbkfze3wcLIxjgSUm63HxyjubXUgYUjsO8\n30Kp/NRqxB6EfYwq/EcvPBOdNoyNYWBBdZp4gUdcg9tl3PCoPM9855sOAI7Z\njM+HacUp1seohaUivv0e3hEJ9MAY9S8SlirOMnwIz4FuVJ4GFrVUHARnxMcd\nt7GWstO06UWQKg6nuzYZ4RChktK1ifs/+hc+z2gTC7NBlOkoR5F7drLwxtK5\nsYXWDOq+aHZpEfhiDWa1L1Q8nmNEG77e+PB+jFuv+ucCDQIJqZx0j4be4ByR\ni8k+\r\n=Yl5F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLPSFO3e4+hbifMyYPyb6YQZJdT3tr9l8A7OecohXmHgIgMGZyRC3QXyggdwtWfc0xt6Kl4zPYhsRuY5Kbxo/bbUU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-inv.20180828082642_1535444913059_0.6772689097417395"},"_hasShrinkwrap":false},"1.0.0-master.20180828085033":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180828085033","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"0495301f0b07610c744efabb3b34aec54b174c44","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180828085033","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-DtC2srbIaeVwaWb+ieltAFy2ZQhc8iEjhidvrSixyknM0+/1wZ7eZIw8Zf+VyNrjP+bHbv8Xuc5TJbpZE5Vrtw==","shasum":"f59f78533b84a4deb382e7a0e4afc73f942d4e44","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180828085033.tgz","fileCount":352,"unpackedSize":1199150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhQ1fCRA9TVsSAnZWagAAEOQP/2zfR2J4eTtkumVs9lXn\nslkNHfUvugDTeJUteJY5kJyPdC/f2McUM5fnm0tORJ61xbfTDYEcEOpPMla2\noiMQqFH8EPqcaUsw5Ipt2RPzCpGnDxOobT+H1Qo1ziWsee9TDJa5Ckk/gFGi\npEWlG7dloQztokj3DpubVzqdat+noENNfE8ck8QRAZY1tFAK3xsCS6hg2q+t\nGwMH8FM+sKyJuMEMNkKJ3r3kAb8morvsPPXTTEK3wSxNx/s67CovgZD1NHb9\n8mJ1QMgA7etaBBexilEB2CSZpAJntffUu+9q1QKAxgwCUP6DMRaFI1fxqNdK\nND0Apn0y0NpVe2J8ds9h7cMofW3WSWb6Vk/pVME2Cv5q/XK76FHsYJwIqL/O\njHY/W4QRSs8JvP0x9eCGCrw24T3yz6eBk4LmMYcLlr7HtuE/HwIagwAXSjA3\npsbFTaY83oDBTbuHGw7jdMDN1EwORpilwHt3300NoWgIVSYbzE/SIDqUC/Zr\nvOnAGAJisgtq46YnHIcGoTYvD692xDGw4sQ7ZEnBJ6UF89sWo5w7L6unMeiU\nkhhFAXl17zMgsEIZXWTRkrX/c85m0dWxL3OVmfUgby1Tag0sL/oim2TuKDfZ\nAyEn7UN+FT+XA8fKVtGbKTvIe4Pb3G7kIOfuOdRFYVmlhsJ0+74M7DNi7B4o\nDdbz\r\n=qgQ7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZwy6420mMEsW31VUmFxCUyusyLkTy5o/HNeTM5FnloQIhAIrboi71SPn7YzAZ/UnbqmlQ4CDQc2ZZ9/valy41apS2"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180828085033_1535446366671_0.19461981278161056"},"_hasShrinkwrap":false},"1.0.0-master.20180828090736":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180828090736","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"325b4bab1b7e9a5a0998122cdf54b603578c6e4b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180828090736","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-h2Z/IyxUPh7tpw16ilDc5x8oUgU06QncEMPo7oXqatGpwSEssfVBwh3wGFoqyWVLQBzf1jsF6YJTSYitgCOv/Q==","shasum":"549d4ca8d920ea2f21db67567c5675474aacafbb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180828090736.tgz","fileCount":352,"unpackedSize":1199146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhRFUCRA9TVsSAnZWagAAUZAQAIoQP+HztkrHK1q5Zp7o\nsvH9dP4RAZqKk73udwKp3AKCmVI1BELWiBpPB6D9BOC6RuljGQYm+pU4co9f\nq45HIjba4LDsMzZATE6cmm6sa28b7GMlz03zlWEbqWCxRjgqkn0MPpbxr5dU\nyRvYpR2seri7Vfs2EBVZbLLJaNBIkIVlnGCu7gFZThsUQKmBjrO0L02jhyTl\nCpsBkB85Ftd7LRT0oVkPT1O6Qmrorm9RJN1fwNvdDysGqqWsn1grYTAXq3TG\nsIGTSSepqPzSVUh9z/UoOn5p0rDl4/FlP6BktW0r5Q5AA9E0GDjzMFZoYjwt\nuUOVHLENgOW6aSXCNgdOfQN56nc7LmkW6XISUB/yXpwFT0nAzIFdquve7FNE\nf+KdxzJKaMUlLLSwJAZmPROx1wOD/7V+e3utHAhkiFoCd3gA2FJ7eBNgyAoS\niJvvi5G6Oh3/xjc9pqtsE19QX7CQa7co/CewQTr4cklzrH+n3XEtcQgBVxxy\nc/ybU0k+D2WxIVfy66JmcM6nu+W6YNgFKm18LM9Jzeif1ZduFHawZD+ooSNE\nlz75JpvzY8PhCk5uT7P8KXCd30A3jFomMTBtVIscF3gJC3i0xklFxJatFQog\nK7cYz9I1c0xgoJuq6T1uT76Kfq1Lta/DJWeM91L/iU9MGn3zJZ+cXUwQZy7V\nwLQH\r\n=dxB/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChrFB83oZYkw62c1E3yX/sAx0Flztg2v2dcNcriarlbQIhAJkrz7BcujUbIjMVmDEJjxSeSIx62RWZxTZYimaQQN56"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180828090736_1535447379839_0.1725754605587304"},"_hasShrinkwrap":false},"1.0.0-master.20180828092554":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180828092554","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"1080322f7a706c6c3626af641258a98cdd42a004","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180828092554","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-OwU3/jtcF4rX8Z8CYMOubw8xHhwdj+etOG2jItH2W0OyxYSFQ+sKQ/EdSdw0FWbb3otkEmZgl5swBmT/6OHZfA==","shasum":"ad01828a7d48839bf150ab91312f8d8bdf0c8bee","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180828092554.tgz","fileCount":352,"unpackedSize":1200111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhRWiCRA9TVsSAnZWagAA7x8P/29MHMqFYwsaqhkZob1S\nT+C2ZKbYC3XZY0lAP3X/LaawJyQzeXj23cVCz6gmfS+QkHMPuE8kP/iAMd1i\nCwijflNbKgRl4UAdxbsPn0Xt9KsP0WjhBRRACMgpGjS5asZGAX9xJfGeWsAr\nTWfDb3SAHG23EQWXrXp3Z4iczSPzd/oOuni3wwowJNfkkDfVwow3kcfcpA+9\nmsedrMW9sZV4biJ5IZM5VhWHNYn03Dk0IqC7FgJlI+mr61c+K5hVb1tfeEC2\nU75YWablZfnx5j8qV/7CwYK5B0sFrnAobVVSIFAzj2yMJ9X9uJtZJLaBoAiI\nD3WapuA6NTUdN4XbueHfsvOZKasMluhnjVth+M8pOn7+nWFCRca2JNN1uqsE\ntnMtR1e1z8mGNQA7a6xQyQa0AGsSYQWrbTEli+NQmbeAvVU2xjMCsJjmJZ7H\nqP2qAVeYmTCM1UvJWscKDe2jgDmYkOdsPbtwJUt0j+onGWN/qGSwnd82XO5P\nXNFFJLH1VWl7GSLb7/ERsAEWGOAui+2JLXEErMXuG0/4o3ItctSsA5gRDhKR\nqCG9PMFuV+Ki2RN9W0y/oH4YPyycl5BzdTVMLONZn/G09R1lZMK2MD9YBBmw\niICUgxDxqqv5czcRGjdM42OOCBrw2VzqRO8ZyLULrK3fRsBH4oJvGCYhijDR\nxKe0\r\n=jVkW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEC4xwFKEPFcWFQ855F+0CEn+be6kwN7yv+EC6uvtYHqAiEAtj5iN3A3uFSXzEwGkW2eDXP3k3PqzhapYL3jkUIk6Hg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180828092554_1535448481438_0.656751434986073"},"_hasShrinkwrap":false},"1.0.0-master.20180828093057":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180828093057","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"e39bb9ea4ab88e7000a7305c6593ec56e49ba2a4","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180828093057","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-h18v/05REF2RD1zzH52gIADEufuvMPCISxz7MHXDLQQ+DYlMHjKtUwUi7baJQCJ8Jf80VFQdzN+297jN6xswUg==","shasum":"6e5c305fed0ad81ae1e669f3c184b8464aecf560","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180828093057.tgz","fileCount":352,"unpackedSize":1199858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhRbUCRA9TVsSAnZWagAAElIP/iy7st9eSmrUKO0UVJGS\nRITpjKlYJO/HzqCPSqObbdWQPgaJ/ptvxa1ZguZFwSvxfBWGcrkhjlhcWkBS\n1O77X3QHrFKpzMl4MfGwf1MEVrXVJ5tQEivbO6OTKuoujnyJHdtyXQ8UvByE\nw1/P84Cs9a/pTVNE/R3oHQnSr6VoKe87ApQizHCJgSkH2rWdKPmoEK9xOVGA\n0cWrwPE73wSwafsxNNsZIpklM6gkkILwpIrSDJ5Fyd4uwaQy4XAvx6CKq8i8\nksCbf2Jh52HPb7L4+1QXF4cJHanrOyOku0iojlwFvQHP8NSwY4OMCsJOZAED\ncBgad1FcliDYHsN41S+92hYhyqoT7z8mAgkhPjE+ZWPP0gktfYymK1Z7iLqg\nXdBb1q/h+AReWSkhwb+/HcdWhvKogolUx4Q8rg5qbGKsOiKZqN6rMMhIOcae\nspyTVGdNK0LwEqZTBIId3a7YIiCgU5hC9ABauzDU8pCsmlq/vfM38jbjB2LO\nMLITM8QYnR1KG5H2L2poghpw6KoBFw7WOya3FO8INNkPP7qX4o8gUt2SQMrH\nXQqw6gSQ3tDG1mxmq3MIUy2tG3XFsClHioqjMVetMWOOICv+U4/d2TD0aRT8\nIUvGg42fr9q9fmnB8sU1K8g4Uh7wG0pfJOvWLdUUoH8KxHLXw0cipmtD9jPQ\nFpHZ\r\n=dI+/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8NauYqo1l1qfvcHY1zjp8WHTb4ETxmrSjVayA7Y4UFAiBymbJ67V8d4kTWN5YnkrOw8BAZB0RjBlg8LE5bCrEnbg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180828093057_1535448787947_0.4869250478254872"},"_hasShrinkwrap":false},"1.0.0-goal-rendering.20180828093838":{"name":"@atomist/sdm-local","version":"1.0.0-goal-rendering.20180828093838","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-progress-bars":"^1.0.8","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"68e91924320c03deede7dac815818236655be967","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-goal-rendering.20180828093838","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-pmCr4gObTv6N4uj4ba22/6y8gcn1BTwCso7+BMcfe2RZ0KV1ihDtwe/m44eR+1PZ3BK7PxzLxZM8FLoMxjZa9w==","shasum":"cbc742c4f45dafa73a5c3c1849ef472f9a5bc295","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-goal-rendering.20180828093838.tgz","fileCount":355,"unpackedSize":1219647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhRiWCRA9TVsSAnZWagAA0cIP/1jlCJmQBmtrXgFWN3Me\nLnX1fqw5cCKmZZTq6Erm+H3jmsqNq+AOmaEXOovJQ7QNBMQVpol5at/H7OQe\n7wLv9I6T8uU62B+Zapfl8RqpDjYgVGSAb0E3PPC8NzywHb1xBenyQeiA0ZzB\nNMlgVh7+SSo9eQj1Eu2sdYdnwuMenu5YqWZcqmDAqJNpdnrE87dHUAyHcLj5\nXJuuSnyPbT3ly0l6615OtBPcEXuD6U6je7vxRcfK6loN7MoW9Wzb9edvekpy\nMpzD4VC7VKjW13lyx0j1UHV3JtPyVZd+Rj0GhRUMrmW0Gd2efDPSgmVZ5GU5\nk1N5RYzAO1DtXZDBwHjoRCis5sBBinocBsYcmzduPvfsobtJVUZy60wcXMuT\nPvGd4awYYg1rt6C8Ydx2A20zn+gL+UHhwBq+b0F6wcdp/pH4i/CUOkXVeiRd\ntju7p1+1JBlDojJqlJfhwLpB6KzloQj8wJlQteQZxutVtfkpeYpLgL5LYA1D\n9uBgNNm8T4FeNIH/t8K71ofSS8wZSN+rlcA80KgOTMaGTwIXuKA7EHX/Dbqn\ndtOxpJEuJW3mnFQCjxRnJWIjocPCzD0/hAzokhQ0UU2y4bUobiKnTMSz3SJD\nhzPV/EjO51ubpvYcZmHdDeK+4m50rnhgTkzH5O7h3vQnZaYY2van48hC3SEf\nML8K\r\n=MUlK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDKBI7r9jKJJerkCL9iMYEpYggY9HNN3I7yHUKRFI6/uAiEA7++IICDpBL9vdn+s7uKw9vUF/oYpas98qq+0KvnqqNs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-goal-rendering.20180828093838_1535449238106_0.32028526787947564"},"_hasShrinkwrap":false},"1.0.0-master.20180828170410":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180828170410","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"8627d6b41e3d36c646197963422584e7554939d1","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180828170410","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-pWg4Q97eXBaUcEiGJ4XeHvAUS+g2gvPhY6UgZQ9kOCrrphJJ0tNyKOEACgMBbly1lL7qnzwuj/CS8msMcdNcLQ==","shasum":"85eb6606c20ecbdde9d400bedd717de0cac6fb78","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180828170410.tgz","fileCount":352,"unpackedSize":1200319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhYEXCRA9TVsSAnZWagAAFQUQAIH3dgu1NaoA76Kd6Myh\nuoyjZGfoCOL/DzWDVsi6ve3QKBBC7GyMxmOJQEq4BpVTdjrzXDYoANDlKxRg\n/U47ElV3cgmiLPjC7M/pVJQe/qw2qohH4AsCqwFFZjsqUUKG66MkH4Ehmh1C\nNpLb3OoSLT6hhRvSOC/uOJ7+sn4FdRn6bQ97f5sKeZ8l4yfgqy/n3Rp/JKu2\nnJwqT/HmLz+98rzRqHbFHboUBTa/p2rMnLzFUePJLM6wC0NuhhYZIWcv5wut\n3fYCm08JS61eFjSusPeNqL3nCUwGqihpfDEaQwr8PVRtkfTNWay1qSUAqWhP\nC1jUZlnkSRj+zMFiGxe3u8PkJV7R2350gnHY68vkcOEDBwIcxnbQKk/vrHL4\nUcDDQ574v6pEFrOX7LHnP02jalIHTRxGR8bK3bmwJwPFEJMRvjHHleaZeA8k\nOB5H7ENG6TV6z+InKRnUm9NjtkL2SogD8YLeJAuoq4iV6SxP1DvqBkZ2yjIk\ni/Ziur3IrIyYAZPxiAllEfsRMIKyQiUx59TwXQwvvcR66bwM7Bg0fOqgnKBm\nyT7tf8eBY291ggRGVhckGVt0TzAXmIIrrSvQZU8WrE1fvDls+ZaKdTAnKf5s\nwJjcVGVIc8xxRTsVQtIF9nlJ7sBfDd/SZenuA2cqaOAehglfEbKMuqViPJc0\nxE+B\r\n=iJam\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF8K84m7gIJvmTH5HJEVhcH6tAcbKDP67iW2ImIEe1KyAiEA1tLhf6D6dlcbBHCQd02sJAK53LRUwn3k7tk1AzvTxNw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180828170410_1535475991069_0.7555093122044321"},"_hasShrinkwrap":false},"1.0.0-master.20180828170931":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180828170931","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"d1d7b9e0f316d59c253f3162b11310379eb2e2ae","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180828170931","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-oQESYaOzq8u0jUKsATIMOTZVNPm+UHNom9C3D75mlQ8LqaiYvlf6syPBEqpwhYkI1sZWm7gioEw2gFpkN/vBzA==","shasum":"aa4e1046b22f07f0d32bf7cda6e7c9912487d12e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180828170931.tgz","fileCount":352,"unpackedSize":1200402,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhYJbCRA9TVsSAnZWagAAzeIQAJkk9771aLy4jM8qvNP8\nmW1QUUVuh/XudqaV5TmKyZr8eAmj4skavcdd9HaYNWSe0OqIGu/M48PJPgKv\nN6rKNYCFRZVh7pv8KbWH7LFYQtoQ+cnL3I1r3msrOjX3H4TCv0h84C+lfBzU\n5TDkvj3atYUMd5M021D0udscpXPv/uthH0Ik7Kb85JwLcqPwPbrv1kW8oinH\nNavEEdLO3v0l8/l0YQNtCGeAs+x3ZlaWtTZIOT1M2aeEiemfuG/JE3NFCi8u\nbKnCECh/hMvE6CIQ6dFFvS/TthZTeCL4DivnsWEIvqtDP2unX41PJPP24q51\nNXQu3OJ3QYh02j7loi7OBvy/uP3bg8wfPB+KM2CBL0vqR4B0rnZq3vSUbSYi\n70688Cm9exVACDy6vQfplOqMdqTUNEEESM8eGlDr5Ev5MBACwB9T35cLn1Am\nW7LYsQosKVjFAWWAdNoRcpQN27azpQe3x6XtIYL3b8A8FJt8pwn9VkjEiwjm\nLaVnfrL80HrPZD1P2wI60CegZ2NoYcdQce5Pfozo0qW8Qvn+k/zDwIdOAvRL\n58Lzt1OhyP8SmG3e6VEO9IzVqdFOwTxoHm8RNvZMN1+wYm/TLFsboTGdqHdo\nEXKK8b9l3CNkQSmp9FEgBU5+cdjIluv6cRpPX2+EC+0LLozLXZ2QzeTu7rsQ\nvc3V\r\n=SFMH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHotqCehF3QejRptRJid4hUpfEO6vsMxPmYz07R7a/TAAiEAwfltxGSXaRkHu5rWESIf9HMTHpdRTvwOi+OLdnRSBY8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180828170931_1535476314495_0.045944013376685966"},"_hasShrinkwrap":false},"1.0.0-master.20180828233103":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180828233103","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"4a126c0f828209c58f788ad1a9f72501746482a0","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180828233103","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-mWV+2Hok7ImyBEuB3joZ7Leo6SzvGhkBiux/dy0YPAM1tvXxvOgSuQDtkkFt1Ikqx1H59ZQ+O55e2NJN3hHw/A==","shasum":"4a6628c5ca78e1b969e24dc52405789679b1c90a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180828233103.tgz","fileCount":352,"unpackedSize":1200265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhdvQCRA9TVsSAnZWagAAfccP/iv2w0Tc3mDvEJRXbJsV\nNyl19ArWwnjrIWUUpTT5ioA9N6ya28OhIuKTtAHGtXVhQTvJffFsTcu4bYqp\nyOpn6F30mgXEhCzg2CPElejsNEPnisBIfV3ejaJxxqZTU5cM3AsYiXMYxXeM\nZ+fXXGYpQuXw+w0D4Lassfu8A8IVZF9HqIMCHFi/yAAayi+Bw2sodMMdSMPl\nRVvQBCIOkCfSZK+gNou+4z+qPwSFoGX0D2abBdHYyV6q0nsFPMGbjCUVdgPW\n3ATdAavi5o7hxwwiKb5SNYqxNHqnWN3W9AoFM2J1U1YlRKhBbntNHmeVXhgf\nRcRimHIL5YYcYm0tsaBeoXX0eLCjoHnJnitYJqZXHT6VI6INoEZ3vjTQ0dmO\nHJ0U0udptCh72bfswudDQPGYgXlqnKdpwRdK9h+5AOAFyi5kObPN24WiUjg2\n/C9X2kq4lpeLvjNfQ3DFDAicmkaD/8YO1nlkX9Bu6ZxEWwhl0uKfwI7Luk0S\np0+b1mJ6n4+Pu9R5l9L1+WNl7xkG/mX+Y+CJvc0vzWQijKx/B6w9GAph7HGW\n9WtDWeYASQVFmXhzPzJmFRyFRnD0uGErln7xtNoPgtu9W1j6Dchd99jEh/GC\nO4rlJUPS2LJXMHxUue9jGRd9wd5eVa1ecwZiioYJeEfyi2HDPTj5QD+byiMD\nhMiY\r\n=f4Ds\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpa2Stp6re3bJ2uYbjmuf7ZIyngIUzj179X9QMrW/bGQIhAIKkdyCzzU+gzzOx0fHWbirUPJFSVDpWnjGuHdP8YOGN"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180828233103_1535499216146_0.03363532376571898"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180828233214":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180828233214","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180828225728","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"c1f90e2002a126e703adbb966a42b8861ee0c655","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180828233214","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-HkYWBpCevrgl13ZV/qeb2YvxtnmFoS8Vog+0nSBmhUsyQ3Q3sJBHKBxpVgpNgqVcGaxYMnSih2+v1c6Vl0IdXg==","shasum":"c799f3a6f76801f4edb0043a46d14e95e465b883","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180828233214.tgz","fileCount":343,"unpackedSize":1196115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhdwNCRA9TVsSAnZWagAAMZ8P/2+v/khuuhv7QC5pN1Lu\nD2oUO++heHsRVoSCCMRzG9ihyifAQ8ASPHjdgWVR7wr/viQvzETwu2IXs4Ig\nPSfnDnamrhzy/uCkXLxmV5maWF8QPnpXm9zW7YAnxQ+nOwsI49naWOxDB+Jx\n5GdZ8Zq45Ti/nHYw41Q5EBQAAsMcF0TvzYZzN4SxmPU1ElJEsF05JOhvM7C5\nTtdu2R40UZEbRqP2gwmTfzxhgax/YGF87EP8u2UYds2iWKZM00ZKebqKSNiE\nBJ5ecq/ebgLx/EG1tWjYVeu8l36jqkggpTEfl/azi6kIYt12bgddmQKBrT6p\n36YgJ2VgH3XLDef0UBHsZ8MabP3g+kNn0YeAwfbiK/kZk185RJopXQiBF4Zg\nwGCuaZaFdqGLJjcbBZDJWCGdaKxM6vhEfs4pCTPNwmtnmSASNV1nJvDXA8i9\noA0QBzwpNI/kR7XIg6AjJZ6dtD1XI17mbKi1TscMVZEwznwup+7vhco2Or4D\nx/q6OOIVrjiYAhHDCFJHpE7h2gmIn0suPwzdrPBJRjM/WldnAjZyqIIANmK5\n7mYjSf/YPOQPT58d59se9aLJLgfKexZdetaoqZxr3ptLvFuEQK03EChNRmCm\n+pBXt7XYtjMsqGv4uZxSEDjLBWJBxEAuCzrf9riPHiatQL4soJ4Sj+UQdQVH\nCEDx\r\n=9/wV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFcfm9wsK1MEX+v1RJb3ftNGN0+uPKj7wFbD4qMSdCacAiEA0y3XbtX8hJi7kgy+wWcuuzmqauuQjPZ2dKcd44j+fSw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180828233214_1535499276680_0.7513346559746332"},"_hasShrinkwrap":false},"1.0.0-goal-rendering.20180828233218":{"name":"@atomist/sdm-local","version":"1.0.0-goal-rendering.20180828233218","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","node-progress-bars":"^1.0.8","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"bb5010a000bfc3c5ac0f84a51767916003dac736","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-goal-rendering.20180828233218","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-M12rdVmZykZRBA+2vAd9N2JFiTEL64KcM+OEQub/kexUYuWi2izUcQaW93+Ly8OTXnc+utEaQcNMdr8t9tKsHg==","shasum":"43cca82e19a42f1bd3ff8af9986eca8fbb399c32","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-goal-rendering.20180828233218.tgz","fileCount":355,"unpackedSize":1221571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhdwdCRA9TVsSAnZWagAA85cP/3j5IvILpznLtR3zAbN3\n4RWUzg0j7buOqDRQtltw0IgUozerWvOmzm+s0A99UUwz2VDfA6oFjKGvgs9j\nmyA+D5uYrxhXzu/mDTq1tfGbhcz1hO+E8LwUbBvnobBp7G+Skr+8YmcOIjas\nBoHxqKAu94gto7tmwjnJMvt0PvpMMZLxM8Expcl0m/1EPilInGx+p5d8hYpW\ngnU/65Vd5ueqL8g+db1Bwr0I4ymGbnRUV9lUh7JEtIYYOVfVARTWo1iasqA3\nzW9akhNXx73k0B0h0ydrn6N+C3dcglZjHlKwqnU3ZpaB9nkJZ2g7kzbgAR/s\nnAdwQgwAI5Dsn6P+6EWwcu6EP4tqJyPdT5jAv0+c76P7Fxc77/xtM9+ceSfy\nJ/1h+I8IbWZAQiaT35SBCNU04evt8WXMKbF3sDRDnVuj30qNaPsh+6zTrtOn\nxANKBM4ki3iqQQQfgX/z+2XUiaUefCYGs6ZstbLZVrcq2lIC3iTbtRrgjzR7\ntKkajSEItES/S9xx0ovOFf7++lD1c4Pgg077VCmFzubp3JKkbqE1+iChFSpg\npNEHzGMGU94T5K8HR2rCshbicz3pCUyqKBhrZ97ZO4oguskOa3TE3VCMvXFv\nzb587qDFqktz/TmTVE9D1nf9UUW3nJ592BDS/VEmuetsSw1OdbTUTdWg8ul4\nff5j\r\n=ff6x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+Rs6xGbLnAazdlx3ve2VevDyxx1kBzdiYy2BL07btvwIgP3YQt4hdLCY1Hoo9soTPKNg+vLtbVWsNiV7J45tO3zQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-goal-rendering.20180828233218_1535499292574_0.32533530299620894"},"_hasShrinkwrap":false},"1.0.0-master.20180829050738":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829050738","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"78e597a427b17fbb92187174d6090f59c02d1ab1","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829050738","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Pkv5WjQWYyLNOX32nvDUQ4aXmk7ic5Co3CaM4S1jCr3vEYtxEH7FI6RZWKQshvV7WwcBTDSwoncttjLDLDgR6A==","shasum":"8651c5f13116383dfbd3decdba0751677fed2654","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829050738.tgz","fileCount":358,"unpackedSize":1210571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhiquCRA9TVsSAnZWagAAOrIP/3MuL1gHh3obYv1U0J4Z\nPx4Fv6wRUv3xFRC6xn9PbqUqoEk8PXa3ugVnf7DPqIQa3cuz5XsTZY+nsX4V\nRMU46TvSBDNjcY/B4Kha7ryyiMkprClwk/yzJMiXhf3/LcczY6BS+XdY8Njv\nBmAhcNda8sE6cNnRmBH2ulzA8Q6Wv0nR2RzFMN4qI99/GlZo3NAofOp9jztQ\nX6m0vZalLMnxuHBc5I9X87zRWcvWtZ46JOfdI+TY6AccC+hnOhJrXcDd8QJK\nP31+x22hPgWu7JU1+5iB2eSoyIXtytmGgLG0YSfruLnJ0zi5t0EQ4uP5EbKo\n1Z0WKy50XD5Xgagp/QhmBUyIcr1Kdd5g4iQmoFjDkixP4hDH9KQvi+O5ebp5\neFHWCHtg6D3SP9AOlz6RUVlN/7pJTvBX4RdxEmDgG9D7F2CiHNPEIHkG3/Ja\n/SKw4qneQ/aWOeMUxgWxhLKgd2FJmTHc7jH7yNO0m+sBT7DcEXUphzTLoTSm\nd1ztcT0DEdiwqH74ivtYsiQDDMOvEdYgudH5UDGXhBpqdROLJPYFqOLFRB4h\nMYxoEsLnjfyn/CY/HNnoUByVfvbWm1hiHwVpkCvg+ZtFVmDF6OgVQ6Z+ekQl\nA4wMbewiTDyaFHzwNV0Iyh0Z+bfoe2WC3A9n6Gq8p0vuxJxt12aKkdjnNj23\n9/o2\r\n=ohXB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKypsAatFavMbDIRS08oo2hEpbiSU7od6ourvEqCgVHAIhANjET2lge8bmZDbU62KV+6bl0TZ7HS6ZUbDsvp7/MYqD"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829050738_1535519405336_0.19724881737719846"},"_hasShrinkwrap":false},"1.0.0-master.20180829054459":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829054459","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"7346f0e0cf34c696032a23c5d2822ca61bf168da","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829054459","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-99yGBDY6iQPKyPnavj+AUlw0FKbPs9L+yzFvUpDJevcACYUq3C7ED26vjz1xiK0lfHlkJLzdCGiGxLM+Mu2ghw==","shasum":"e0285c628f04de45a3de2de7b7acfee3918121e3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829054459.tgz","fileCount":358,"unpackedSize":1210497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhjNtCRA9TVsSAnZWagAAQMEP/3Qc42z/6GG+IuJqnHUm\ndP6Hb4OJBiaVQMFRt7TIgkFJ3o2lfJoeqiPGuF6iRaxPzxBm1ffctRmoZvaj\nnV4MybRcns0y9s9ufxVwUlyxkwjckZW3rGso5h8Q/e1Uh5acx8IAuZUCCWm9\noQ+z2REYPHoFWRwUlJFevaR1g2p/ZhowBRRU9TwsYeUv4RJySMBl5NhlTc7U\naZxGwnqvaGcGoF3uf/qaRksTCot8GM5btfvV3adLTeA+EwbE2Jqb6e5Nh34I\nOACyGIkeyaHM3fthz8IE78CdcRhMfBaM9YsyqjKW3tQDEzU0fA0DvNkJuqiL\nGQT+aISSPP8s/x42bXs9cZsk4Ayhh88VEtxZqxWXx6NsB8eL2n2sniLr59R8\n92Yy8YrJxghCLx1ndHRGbCDxM6lb6VACtRJfWK+ZWd6XlAgpm7v1oVCbLTdM\n8sKiXawiDDf3zN/0QXQy/dmDv9YI7mytN1LSCU8Ea38nwvdIvIWHLaTjmtnK\nrp9S2TPPT7NfOB2E59Gz8H5py85ZqGUfOOOZDqzxoLv0QBNUYmJWmbXSZLpA\nf2fqHJ/fw6XYkn3q5dpivSUtAtEdo8oJ3sbRnhtUAWDitA/27P3GSvsv7XdA\nGvQuO+9Txw6DdUquVSzCQZr54SLlWYvAhPEiwbnIlK9E2dGk5vd9OhtD7Mts\niFlT\r\n=9IBu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC2bi92cIkmFttSbjsOI1gKqNlXqG/GScxDYm4TjgNnPAiAkvaEX+3SQE3yPH3OuiwVabYUjXDpkPLC6AGQY+/9hGQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829054459_1535521644389_0.3895135210103211"},"_hasShrinkwrap":false},"1.0.0-master.20180829072925":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829072925","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"44db96878d9e38c63ef92326f57175e9ac2b5fcf","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829072925","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-e39h/LyP4eDUl6z/89ISg805fKmI3XwyIMviJqsRIGUU9V+z5eaVnK2vC0ZqzGBNGMd0SwU2QPssjbNE8ktCpQ==","shasum":"9dcd85bf41531dc3f31324766866c04f77ecb25d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829072925.tgz","fileCount":358,"unpackedSize":1211189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhkvnCRA9TVsSAnZWagAArRUP+wUwquLCsoAc5hKfqoQl\n4dcp8ss2MyPXX3tOiq2ze7QxdMP++i/GVwP6otX3HVpvlGaTthv6GEFeweVI\n1rYD5940bdZC+Kkode5rngWxme1QCvx1I4y95IPGlwxtx/Z8kh51Zd5qaoZX\nanV7zcs2NJHulX10js/BVZL8Q/6nPqb7gRzk9G4dFtGFpcSRVJoRqGPnZjkX\n0X8yhXDdmBSr7478fb0vaKdxkER+uaESnEDltoJT8+0FQiTFntVk5mErLooI\nWmbEcKcV5c/Q897DJm28s2aDFaDfIm5m4QMNs7rhhjuTbad+W0iXV10CoEIv\nQ5mUAdLzqAqt8d1094hAc9GbYXsHNygnRyLIrvW8n+nRymFngB4SLD30NMrv\nJSPMshBkcPW8rSU9StL3PcpnbT/vt+pERZmDv7QKq+MQnn+onluOvqO+NyX6\nThy821QqlhnPAhaZE9bGGc3TuXbEPlUDrsJx8Ug4pjGcdiKVroLdLRiJUC1/\nJxciimPJc7I+qB3/ZQsqIUqZeKWEMztg0dmuKvdo2QmcXTkRdINmoU+3HHyQ\nS0D3xB5qg2m+qQbciXYX/HLhK4tL/aGI4y7ZfdwEEiruMXI7DNPAmw4dhHpQ\nkJ019szx4U8vh3PAny5MNUXdtxN22P6VAzTEE9UF9qPz/j2+oLU+UFxkOHcm\no/Dt\r\n=WAot\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOzr1gNCaeQ6wRQo/awURZpmtztK0gWh+4ndi1nFTQ2wIgQRMh/Rt+OonEXXAz29+JLk7G57Z78FZtRvOnvy+Kuvo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829072925_1535527910373_0.394479578837575"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829074632":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829074632","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829071932","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"0671328d614121b65d6b1cf67a889cd99201ab38","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829074632","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-TcLSCqXpAqAT52a+mhoOdTkPSIG2XpNeHYXuZ75Hw9NdXlciN905WcwhbOX8nwdlIIFlSjkhplsZGg2vYzRK/g==","shasum":"ce84e4b61243d2bae7e3ec6546e16dc9ffcf05f9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829074632.tgz","fileCount":343,"unpackedSize":1196366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhk/TCRA9TVsSAnZWagAAAkkP/jUbEcCwTV7GC8DxyUlj\ngeM2HYHVVxb+pC/Wv9KpEDhus6/GzHir+mbsxh+FO5RH7QdSpdfwHW/BTysS\nwu6G72PWrnl3eShr8sVk753VbaMQKpBIBEI+540+tmQUnGU166ld0KN9ZdJC\nFOkLAT64gwJpfy/CSLgaKlsigzwXWMlCmxo0RwsL2ELyNJsVNszsWguR/Rx5\nzRhzTa8/tjXlLtkUqJe9195LKuetHy2/8u7J3vg0vjmuitbp1Jq6boAaq01u\ntU6Dp5vjA5NAOENb/RGcZJB/wXdw/PqbGu+mksPdOCxKtObdGczPM16WIeVT\n98CO9KLozUiMc2D4nZvDV3qKNU3V1XCnnWeCoJNaOnT8Osu4MBa/4mPWzc7Z\nc+85MkhuX77wn7hvUM7d2tN7VFEdcpaaV34xgkHHWlRldlgyFzfiafmvP8cX\nv/kIJU80fydQ6EsD+F+tzhxuOCtWR3jIjoyMpETlqJPk1erai/F5nahXJPfo\nHAPwBokfWw36t+OeCwkUlya/mFth+0UmsRinennWJan1O8GDkMDVDoQEHLar\nF21S5E5mtgI1+oR+B68+H2iFsxjiwFBxuKmHNjR0/wNFyENfEtQZfuKvjraQ\n6iDVl4JXrsmtIhRBKPfecWeP6w/BSKBguGQfh9foOaFg3aOY7VlRY4wksrUQ\n2mrw\r\n=VVi2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICIA4hew8VpAUhKnTyRoZ7+HE1Z82/mke7OVY1yBbjQkAiBdA/QPYL5ddI7puArW4PY2VK1zdX5dYf8L+L5ppC3XJw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829074632_1535528914383_0.06448554458366274"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829075831":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829075831","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829071932","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"287903d7566ca003cde39f74c7ecb24f1930685a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829075831","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-qbDmfpJrayfUIawmCqoauCo4COTBQJyJbD6q0oaFwEGyJ0i80kWpKElodfRYnvo8UKPoexdR/flxcGm773X6Ig==","shasum":"3dcf149b3662cb5a4f2a5a6249788d698a27898f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829075831.tgz","fileCount":343,"unpackedSize":1196360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhlKnCRA9TVsSAnZWagAApp4P+wUOI4RfgyZbYuiXmi3m\nC3Bftw2aluQBGmqHvfBsS33fU0zNDC1MgstarbZD0Xu8n6j89NbvZvV0q0Qj\nLkZlJXuRs610/yLnyGYz6C1uGFC2oukotC/m3mitm4/Az2CeRB1gepWgNpqa\ncGtbgKbXpCyWL5tMfrhOLrvKi0Qa1pUbpGEK1TnrkXA0yW93Pz/CDmPK0GLW\nnhtZHV8riqp0/ZVBLNrtkxwIbRP67x0Ya7II29lxRhYtDd689NEzgpEG2Hjj\nTMIm1/r2unmmaOFI/DJxEo0WmF8tBzcavHjq9eOPInBOWzpcspIFGdocWLUp\nO2lqSYnWne/9dNlGoahZZ05z/OgJSIUnCLOuFsA+H6U/Rd+505v+YEje5pm8\ntXRdORXB1Lk38UB4014/cQoLN55ZNWayjona/fPtCoqCictf5uXsL5fBVl15\nbCc+3SrBntDXWLguNacgtrH0vx7QTPf7CyFnUddtV3sZMkwcPFawoGH7jMad\nEuUeqhGCPytRkfWeafHBlXMAH7hGeNRXaf8lfCK6glQcpclS0/t/dLawM+/S\nu5ga2kLNFBBhULBnBU6UCmMFJZvjmpxNQuaCMJhSMiEoAhJeTyDlgsBwooi7\nZwAC3E/3dUzXwPKwh2NeBHiaj/UuLLw0eVP+brIzzg/yO3CtdfHO96HizLVn\nNlSg\r\n=qLs3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzNLVypO43+OYsbb10cE80R/ppqMqzd79ifJkBrhuxpwIgMwKxw1p+gC2zZjso62Ako3DxngPCQLR2DdoYWh45jJ8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829075831_1535529638759_0.5441612224470278"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829083446":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829083446","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829071932","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"0addaba56e3ad878d981e6d0ac69fba32da2d63d","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829083446","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-YPsyumZEQYIPEoJx7Lkg48vkzgx1pGR+seR4UF2iyu0fIvMqE5PfQbzoULLwW+xefq/GB/cxodCkJNm4+XQ4ww==","shasum":"ceffa8a3871e6dbbd6ea2fccd1ba0c9691ca5891","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829083446.tgz","fileCount":343,"unpackedSize":1197061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhlsPCRA9TVsSAnZWagAAdm4QAJ9o9FFWXDXR03lYP9Es\nDflnWcAVIsGwrbecytf+I8GAWbBLL++fr4aAtC6hIZQOAziyJsAFnohcRc9R\nD0Uow4fdBA4YQZTu8fONROyKCYEoXwHiAFxesMpNAPwvHctODFLClJSpGZfn\naGdn8u6b1VfSHu8gzrs+P8/CxDPkfUdx9t32q5dG9S9lTzAERQFAU/6TxcGU\n+yqP/xVxB/GNQKuVmC9Df3al3sIKJCEbwBquIi1KIbFq3HAbGR+aT7fJNo1s\nC9zDeIN+HPZ24oQzOzwFST4ZLVb02ZsxYZCVtJfE99o4gH3pMn1ccshDwmwU\n49npUiFL/WYpum3HgpOHE8xMUq9FBZ3V7gz8u3wQx4CmrnjiBnb5lUO5ZRSl\n3vmKeth9Z03Yu/CFV1YCFbwd1jI2/b5ppNp7VNvC9LsZTJXXlBYfTtBgg6OT\naR8M/pY8vkRErn9I+H0GUBahC7slPFkshu+/aJrNdCQcJbnsxEvoGzV3pnj+\nIoHgdRYf2oXAdDtv6hqokIaQv57Nr1/S2KfzEPhhQGnmLoULr/uBmespRwAs\ntmwqvGOFo+OUhH0hGwSE7xHx21fFCN1NEyuuzpxkgfUum1nkTKOOijnUu+6D\nSkX0LxLTxzPi5BupMLCL9WXY5bdkyvfaoo2FKx1lM8k6O+jGqHZm3MkJkFJ1\nCk5O\r\n=Lejc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNQZA5jO+LWEZT1uLGedYotEU6E1F0QeBTkOkBzXGeFgIgPua3XSZmXwsJNoCgJDwnwPdJpxk5aRPG3WSZ916Fcng="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829083446_1535531790674_0.7450366547391347"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829084100":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829084100","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829071932","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"16f4af08d33b553572ced32057bc2aedaf6d718a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829084100","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-aEloIUJwaS4HFztZp1fBwRZsZqmNxkOJwlMxVt3wcm0BMrsjTBiiiOmRfaOLQKwOgkF2yFtSz9pkdUWE7wEj0g==","shasum":"2893c2dab4941684fc8d0533ecd8cd75b47ba618","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829084100.tgz","fileCount":343,"unpackedSize":1197079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhlyHCRA9TVsSAnZWagAAmMEQAI4J/AWxXN6njJ5OocWE\ntiW6JOud4xrjqc3Q7EB3eriW5SX8iKFj+6SM4xyuGouBIxHLvIYKpDouNEsf\nWEk4i+XYu0BH5sVWjHsJkhqaEgFgCVspMQUaOdtlYlEJPtIoYq4XHmYrDUhz\nRq5Hn2L5qMzrpYjUXDeVHcVuDdjwHFRAbFy8p4XhsCZW9Cbih4qgDlfQ6ao0\no7/lwLTgo+qmzOPZ9MlonZmGqnozhsrPjGVu7d1wnrXnjKoUPqH7uxWQqP2w\nUlzBhrLEdw0ZKCoLYOLjHph4o8nLpSwnjZcjPW+vBQl/7OsfotQoJzN9LFwp\n6POCN/q5EHGwtaa2nDjaHdeCUvNiGy0j1dGbtKr5g3odzfdhhc/SBSMaFr8z\n02Lxi15KmtjSeyYkDlxdy5VyBsxkO2f1xC4To4n3B//JL/Wt9WMyIQN7DPdA\nMRxsA+T8D10Dx9t6gIo8GQ/adFOi2D8zD6nQncA9GH7LYtHQqBxiEMmrdIg0\n15GTUN3tueVtijKTrF2Kf7vgoEyaLqe0IlJqdbl7UFRkW7TLNpaXxuj1E5bf\nKueeaEgcA9bpe6PKVMjTew4a/WUeXlxlYaKTPYi/piOuptxwkdJQFdHobySp\n8wp64DUlye71FZJog0iBms0boUK1t6QDto0dMS3T5WrGFb8fjGHGH/gj6lc0\nA8PO\r\n=DHJq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAWe5Keo8PiyK2ks1mBkO7W4fytGfR22u2YeMTOWP0obAiEA5J9r++RGCX99Dr/TVfnkRIc0NyH+wFFJduamAbmoczY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829084100_1535532166557_0.33181375601909413"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829085424":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829085424","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829071932","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"047f7a3f6749ad2a79591ed423277e828881a414","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829085424","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Z3lTlMWYCjeH4tEl/aj4TGD/ryW2qUGN3Nqz4mm0QqCxUklo5AjP/OudMn09rYdVVmqPhb+9RRd3XZ6nhfgOig==","shasum":"e48084629ddbcdf2334b781f1f9a3bf8c9483eb7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829085424.tgz","fileCount":343,"unpackedSize":1197397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhl++CRA9TVsSAnZWagAAuCgP/2GYaQZbBO5zG1MD78Zs\nrWkDy3oVd3i2IYlqQlEr4KFS1FFOCuy7xgrwVzMmJKitfI8/xz6iufvqztNw\nSaMmXIcx2cpGEOjxiwkOkMsiJxwaIlqjdESYa18Fy7SsvMDjA15+glf0srPp\nwtk8J10zRu4e0Bc+7eN24XbxTkRQ/QSTKkXeYIaF0NmSLk6xOjcPCeHh14hg\nM95oUGb6ZdDlsxjZrctiGwcd2SaIGRbOWWAOoxAX1Aiyr732J9HPbUunIKdi\nmIILtlPob4GblKv6bzo98T8Ezcs2CU0LP7PFYMAfOYcjwZR6XQh9OrN8oTPJ\nmVTJXRO/wIIIJcpYgfm0IRNNE8X30GbF90r38I5p5tw7RWfUpHs4MUhwafTm\nL/Tuc90am7KIOIIBK0mma5UXk/cviYRRjaMtYWAYQ3jkrqpMfNTXpS+3OjxB\nYDzz+t5z+5IL0+kKKcdGSye+GfjGlLpW0bhZVEms9/83p+20bZcyHRO4tlye\nqO8z/EwaUdHTx1w3gT+zJC3NnWBbqSp1KDKymeWq+VCmNTjwBoYYOtz+FfoN\nIqxWaaYhWlA45W0XUeHd2kmXPI7BSX44XK0tcwiyVEHMT9u4WAn5JPHtFgMY\n29yRK75B4Cctah4gTnCbFWuRPPZE7UgDtoSj0sX89kVyCBOw44CA/p/Dz1Am\nfOfq\r\n=UtWd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFInOiVecRD1VNUnPd30QVtG8zNo99Eljqr/mYWVmeXcAiBRZcQoFrof7rSZ6VbTWfzeA+2iea67ctxTDut+qAI2jg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829085424_1535532989607_0.6360794965141354"},"_hasShrinkwrap":false},"1.0.0-master.20180829090801":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829090801","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b2e62196aec27555de823c776a86e25f197789aa","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829090801","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-AsCfrRpv4Rt8s/nihCm4AmNXT84SM89tg+G39e6xEDBRehSJEFOndsT/D1Ljd1cn5/2onkCKHBoU7NMMHMApgg==","shasum":"eeef94be414c8a4a1c47c3fc4bc85e852873ad6b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829090801.tgz","fileCount":358,"unpackedSize":1211272,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhmN8CRA9TVsSAnZWagAAKGQQAJT1cOFAdL7Q4caTLngL\ns7YXoujW0UcQNbJ+vsz0SGO0Cm/zEPqXSNYkpZ499/fiIfR3g8/xpSTSBN87\nlWifBSbytJrQbCYNqGYGve2Pn+RKWyE3GyTpJaActtD41GTkVEsytg66oD9x\nGPNSZ89tdXXp69CMwNCI2RtVwR6/aXiFWgh5CBcvjHpPps4GS+Jk6ezlIRez\nk2qbkazRIz6HIZWV3kpAkvtlgCLsBX90EnxvzRLtWfLmykJsUc/e3DN0pPXM\nZ7P64urLpXa0zMSXwFHZv6XBXhjw0+1u/yftYjVp6bCVuf7BX2Nh9xTJNuvf\n6TVK8pRrWsjL4nNXk2GHC531DKkFLTx4Eq5yVXDqvFbYkbpkqdiAIJEqvQMU\nYirdFVQC1ZjsmOv8npe6wi0/DdArXRc6YR7vesxDQsHU+MtY9hDGEGj1Y3R6\nrWnQbSYV/519jVJfD1xSSydU9+zJ4QIbMRY573qjZktvgH7nRT/5W9Z1ZCh5\nv8rwl1Eh6dYobcQKIliDFSPBI3QvXFV6w/ackHTM9XzpRJaduNaJi9qP6QBN\nXGBHfdPLubIM7EnODTDQljvf+Qzx7a2TJMKBvOUSlSHw2JddvOJmnoPVBU2W\n5GSQ2H8E0BBO5hZ7CdHDtgBahNWOTAj2Z2ZVnLjoDi0IRiP0+OpiYMqx70px\nbCIx\r\n=yqtQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICeXM7u2Y4JpL6Pe2wpbzD+0a3jZ4/WqtHWp5qnnJyJVAiBZ79ebBP2LO9nKRRaxCrUc2pg5Fr7tKyFbUQ126SX75g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829090801_1535533947544_0.43421428580768406"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829091123":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829091123","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829071932","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"24f7ded8f1ab87ed551ba47c2b191b38fcf13562","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829091123","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-1lXWk9+ENMCD5k0xiZwoafd/dDG4UbBTaUHPGA/DEdeqP+ZPlowzRUx9hHeAoSWZOh1ntf2c17+A3xyls11L8A==","shasum":"b6d0be5566038d87b13d97e78fa1350d63dd8f4e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829091123.tgz","fileCount":343,"unpackedSize":1197558,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhmPjCRA9TVsSAnZWagAAdU8QAIByxFBw3iyjQGZ59mT2\ntckRj69y4zvNHMacw84i0BZjbzEBHudexfYPX6oj5KjpPUl3Z7NuLLOXaPVH\nScWDrfwZQBUXcaeRmw4vtKX5wM2YVsHy9uCLn5oUp5qK/pJQXyU2yrHeBTAf\nTCTEjLjGVNhFojYQuoxkDoY8dPGDFIxaKDTlJ1aSlsOlrnrAPZt2NpiCCSnq\ngXmaouPNc3BmkAvlRIzAuh08yk89GvBKJJcF8Z17Yi3OloBGEedWM9ZKXXuW\n/WvVmeJofbe5xx65WgjPrHe8qqRRZce6xn1B1QT70bLkDPU7G0JIRGD6xdgd\nXT1ankVBNZJTOfJaHGjE1M9Op9Cr1a7qhEWSeqHaW8ppFkVQwx1NT5jTTNMZ\nwqzQoJ91/fsObBZzYpkYAe3h+Q1CseHLH63mva5J1cxoOJG75QULnyJkD/cc\nGTAivn9tQ0EUyw8Kr62dtb7XU8ExnitXqpiJiEYsx3H637qLi8sDW6NS/Wzv\nxCugV5F39TwAP47zM/dJC+P4Abl1xnrgmvqgOLBBheCnT9MDyBKYGdHwnUW4\nlLuMyyVytny6KwCuhklCRJCeqTArbS8g8bbMnURuercRiB0CQLDuRaaxAFOp\nCaQR2IJcIPOt19snBnl8petd37E8S5l9ViK3sxL77OM+4p8PvZxgeq05jFyT\nMBRi\r\n=A+hZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNcXZIexqVo9N8EbdETyk+JpMi9ibVfsPC0vzv/kXD2gIhAMf8oGHOKGqyOmbia5EOvCdF0aDohLeBftwdWbJzOmyH"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829091123_1535534050263_0.5787098090917526"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829091637":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829091637","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829071932","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"241502ea0ccf21c2cc22a77fdb7eb85edcf38cd7","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829091637","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Guz4RE5SHze5bzNGtt9opkWnetukp5LbszywyxAAww1qVOJ8MGx2hT2BvGjxPr/lhARLWoc2o2A5gumbiy7+yA==","shasum":"f93cdba174a51ee465291ecc6585e7bcff041191","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829091637.tgz","fileCount":343,"unpackedSize":1197774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhmUGCRA9TVsSAnZWagAAVj8P/0nqj/fxqquby4OFTccT\nZtsLZpohPtnSuTiUDBMC2VaOFPgL/GjWP46+txmj/dCu3id+xsZUBgXysqeV\nC4mz4QwgcqqyB7tYjl6FtNycyZ9AFSM5cS/J5JONw/syJhN8G0qYELEzPpnD\nGuYQgPpBl8/uqtmXm7kga/jbpiMVaujP88DJCfd0W6DRZ3pfcR9J0krZ1Enc\n+vHamYc2K62k7ZrC+7SLJRqGK6zsDJ/42D2EnqAMmHf8peHLe9LgUmooGSdM\nR02KZOFLLyCGLoOI83rM97ijKt8zaXiZjG24jgq2y2eJttzyIXv6CzykX8vS\n2VNQYw9de6sIdqalj+tzqFFO5LxP9mumaK2TyeFxyWUvulbIKhySqSmleNH9\nLY/LsYALERp1cwkGpkBSJXKOPdNBip2VTRTdeCGQIqeZ/OL+s9+wcmSTa8zs\nkLLP6hZ+H0443WM4/D+NLGwPPiCuMvYKBhZrvI9sOw1UIeW7K30wYKyp+fL4\ntRSzOZAfRaf0aBavCIvU67Cup4AV7VBCi3JUp+w7JUjKSV96tDFq7EsdUSwD\nt+Br1o6DLMrdChnuCbc8bSa2/h/rcR6KuYFjfgd90S4Thek6RRWttLQUCCtF\noPAlhhX56k0K8vJc3HfS+AbiOEFakwgqMhlImw10vEvo3SDw1KM3r63xTeMJ\nohnn\r\n=WgHf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOpghEAjkIxS1g1cd9GPqx9hVBENStkqFoyqtYO3c9swIgPT0FU9mcje/1c7tNiaZ1y8cGLLnKlvoempAX5fXS3C4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829091637_1535534342094_0.047918184861218904"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829094143":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829094143","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"01fe84cf0781913bf17f668e93228b4771cb41e6","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829094143","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-qis1jOcpx9XDQSwL5q/fArfzXkkzZJc+ER/bo+Dy0zeBsAkOW5gBY1A9ZPL+D3F7M0AqRPrZDr82w5JYbTchdQ==","shasum":"7cbfd190702ceb828070dcf16c1c4e456b8f4633","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829094143.tgz","fileCount":343,"unpackedSize":1197774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhmrVCRA9TVsSAnZWagAAIHgP/3ULxUePqNmVva27yNs4\n+G0ptWFu/ZIkoa5/k1Lk5OqLEvAtfToJu+pvj/VCcL1jXA/0mF5HhILmzLG4\n3zrM2wu6nZKcpT1DOKgjE/UCWRsyziCXpSfA2b2fgfa8PUudz1mDzFQ/M+sm\nWQa3u7cPh2Wqys2d+DTd2dsembZPTDSxfsU6/G89xFQ3uAlhI9qvaULtapMv\nY/prXlK0lR/H3AME0vRPRuw6YqV/ESx0o4awxcYW0v35oHifkzwrXz5OG72R\nBjuXC9p9LxAINKZDEYQ1A4NJh+KG0Izm88Z2hE8f4H62CQoJLGufsEME88Gv\nZjj9Dvikiz9qFo27jkauAq12WYXPF0Ak1Wd4wmdQJ41xY+BmD2WZhGWEMiUp\nUAiCghrIjF7UYoeVvyzAoEr+0s+yM5N0Rvx8+dW0WqOkpgXXKrZKOQ2O/IWQ\nGrw3TZyzLQ7q3yb6t6WOZEyDI5LOhkvDnVbW3PVMqqmwVpSmxA0s+bwfSlhf\nTxEm4JM5kglDAQRsbKLYoYUFndbwfq2Yb1Dc79iePf5kIiDInzDDEpLs2dRf\nFC8EPG9VlYlio4OXC0OHj+tY+c1OcMiGYLJHYtv9SjE8PLdo1EcuNt4Y3+zJ\noZMR4rr1Upy/TVTrqsRSsltCCTCAtVIiKGxLCRfLRRnXGf5Jb0N5uJcuQsU5\n7cHS\r\n=VtWo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCs9GsgYO0RWWInrTUmlh1Vj4Pxp2Guoed3hrAcYhZ+qQIgbONMHH+yKhesFxIwnX2+/5DKiPdt3dWnT47edYsn+aI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829094143_1535535829144_0.27760339431010506"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829094254":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829094254","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"102ddc5716d63ef0f7353a89c317df00917c2728","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829094254","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-KWvpcEzmk9xVuzJhcFmGHPVaQpslKAQU0eHF9GHFSP8b9SzGYXbMnYmFpatOgcPvo1kcNOaAWxH7wqpyabAPoA==","shasum":"a26cd7516aee65f62b08ce81db60d37bdb6c64e7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829094254.tgz","fileCount":343,"unpackedSize":1197774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhmsjCRA9TVsSAnZWagAAy2YP/jcpZun+e3P9tjmHYtU0\n8d3HYdqIEz2KJGj7CJ+xymOBompQ9MfDqy2DpTm2lenWfax24mBaQzw7gur9\ngJ5W83ylmy8b0ZSf1t8excvTtp5mOHoAIUQgF1LKa+63lGxzuzhTvERYQ9Sg\nKqx1wxJGCGBDrbnaNwOij2J7WvLpui7lLILXJpClpWMhRDPA28zx9FZLkhgz\nBr3X5a6MxR9kDgJ2wD7Uinyq3Hu+oTBKIi+b3/YSXu8BLbu2rnWGBK7xHXwn\nfyBSVoKz+L89gFAe1EC5mCZfahrrcbloXfoRAq3Mbw/hW3ADKWWBTEylShaf\nIF5GkK1rEr8TWWACb7dSN7B7moZHSQi5fdNszYhSoxHlKgiBYT8dkwq8b5q8\nx6A57B4pvcgDIag/2AX+fsHLbi0CRQ0C9+WdcQ84OCocPx703etdVimlcwsU\nhgVZpHoTl2+LcE9aH4aFWGpYvvYg2DV2M5W3lKrMTMEj41U9cu6JS7H+y29l\nnRZ2KzqPGT7M/qfb1g7Z3Z4zIJFtQ7yCVph/lTPiqcA4TBZAdkzwAxB/v10b\nBv4S2PO5ZQQ/oHNNX0av+0zOZXunoNguz4kFmvjR2QVb3gPqu9dRUH5HPGTT\nmtuLmwI7vw5ThG3DgmaFEPpOacQqQ+VVO+e4zaC08Zy5700kUBy8lr0+cgUC\ni9kZ\r\n=6Ffv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4z//J7F6bHgWSsyD1jPdCY7chpJjo9JX2h237OgfizwIhAJKaBHGlBKf6o8FqlesjH8d5YD/K7KTCWqf/S0BEMuqJ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829094254_1535535906790_0.4562444157611676"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829094838":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829094838","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"ede677d68adc2763c5afb5ac452bf24287c6781a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829094838","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-s7Axz79UZnvuUT/09wCVqBwlvtJEA0njay6H10fWMnZenmzQvNrZhw0BFmjk0GruHmWk4MxqudTh1KHpdt2xVg==","shasum":"4521176261d4918d77a003854e2d99bf789bc805","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829094838.tgz","fileCount":349,"unpackedSize":1208854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhmyBCRA9TVsSAnZWagAA/qQQAKOZozUkgg3V2caAVNXs\n/BUGN7HpvWedFGlwCOaZg2OlXjAW6vTETQbDZ2xGRgW5Oer1KlxkLXd9/Y+k\nCUUry19BRap9k8JSVP5YVNqzwRU5yClLy1qDhyQK9s7BD/XXtfOd63UKUJgs\n+Qi3GMbiSNI9Iq+g+YteJMUsM5I5OPt5qVpnK9g+FdgduBRs2JxigleRB3YT\nVv2x2WD+C9d5PWi1JFMeKII2VDd/B7/SxTqDztZp0sVFbTnM8gMgYY6UCoZj\n13NgSXI1mbDyTwHD8NYGh7y3eJFNwo+0tNlqqJhclXIFFnurIJnt0mug0jxT\nVnlTBGLKvFzTN4JTrmUVtiGIhxsV0r8w7FMapaZ3RYKe+YbLJ8E5uGKKhEIC\n2fS5KzIJe0YcPiaUJNDOWua0F75lEcpG88JAc+TjbZjDHDzbJhU2MK7D76Xl\nn0J9QrlKrg0KpV8An4Duw1QT8qcMhwDMFLJGUTHoDTEaylEY+rdpCkb/5OhY\n+unaXxeSAd2LJ2ypl4bbjhigKo2AM5+/kgm/cc5//ZHydkdlga8TzA1SdQQt\n3aIDFvtdSFclxHQ3QS3LOH6m3mxMCuJdzpFzz1WseTkbs6aoNmVyx8RAuBjZ\novxesLcJUqmKtAEqDcbbhlKfoCuaht8M/+1rFzA6q0TuK76GhWhN8q4MKLoo\nmD5G\r\n=iGuK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFBx/1lL1vke3xZDZ7hLf4sjevojKef64Vp0fks0EUw9AiEAyIn6ttM7XcCwt8IvrBt38NRwi8u27cVrJ6CyzAgCgVk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829094838_1535536257230_0.8092816280645787"},"_hasShrinkwrap":false},"1.0.0-local-configuration.20180829100227":{"name":"@atomist/sdm-local","version":"1.0.0-local-configuration.20180829100227","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"e101fa63dcadeae33ce49ce717b652793c1664fa","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-local-configuration.20180829100227","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-hs/rCb2ysZPHlENyM/4KwiY4vzD+Bcg0ficnFs9gPn+bq1PjaP98HsEbSzWErTLMwGeE261XB3gBt2q3ajg/Mg==","shasum":"2cc6075f84938e1c52970e7d9aafe0c4568c3e0a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-local-configuration.20180829100227.tgz","fileCount":349,"unpackedSize":1210412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhm+zCRA9TVsSAnZWagAAIwMP/2oFoHCwUsKDhdw8HMsQ\nY7OQ5k5T5r+xiMs75HYOZzpukjddL3V4gVGZost/KHKQ2a6djN1vVntM0ZwL\nc6JERw7yDRQrBjQ18KjzJxGjQsfVj3P2C1v+DID7ndmqOt2Q98KvGN4bGE9i\nr7TZVUhkOzpO1fBSLIvEfjKhVeIHi8dDJj/TzALI8HZkvVyuNOV/1iC5voWD\nY6OSBb9Xuzt/vOn91wXkA3o+KtQfBs3zvRkryuomh+cNbZ5oHFXjsUCiFPk3\nCUVCm/5begkSMpEOyq+IFkTIWWfFPr4c4bDWKyYPQse+yjnVidsQWIJbK3bm\nwyEtIFfVerh/PGQSElSubfhcw5FnJ+Krn9ViKBbzmgezAzGbODVraJfg5frw\nF3zL3a8qS46vca6EqCr5vrmVwqiH6hcscg67xxe74chXiTNfuoU1AwLoTG2b\nv6bYHY/nddwzyEjIfZ4rbBZGUTMLjgxNjgnBGtlSLhjn4Qzlu47Fal6nSBHL\n5e47nEPFj8hRjBuXB3Ak58Zz5mF9wIDM4XO1cI+3ONH4DRDOOGlKWF/Zas+J\nayyrIkx2Wei0/iKt1lQ3Bsp1N94cojLMc0pgx712ne1ZzWC/JeOy4OWjFRGm\n8Ax+i+o7/cW/YFrYBWypr85H9drGPy/LH1v0wGVpoHCIlk8EnHufxWqrFxD/\nWG/X\r\n=biG7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCg9aibOnZjBEV/AyVM8OKIhZyhkZSGqkDgK/rLVZqkWQIhALnKN6NJjQUGtIoSHYpaDNOLa/lTheUZ3WKV8DOVBvzh"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-local-configuration.20180829100227_1535537074907_0.8819541308934846"},"_hasShrinkwrap":false},"1.0.0-master.20180829104519":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829104519","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"4fe0048c0257f50c9c89ac124a063e5c325bb0fd","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829104519","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-n/YLwIIPldvz1czapG8qc66uOebsz6dP4kQPHSU9/urFv7gPyTHbTYzQTeCK6E+EurX28xWhIgSfS3DmvzOlaA==","shasum":"850d0d5d5edd415c7a4d4c88e1cdad29cb1984a9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829104519.tgz","fileCount":349,"unpackedSize":1210231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhnnHCRA9TVsSAnZWagAAtsAP/0ySxBWkqVVF+m9g7/M2\ni0W0PQYSJlV/1TtfoXfWP+aqLErZCYGcVR5qUxS6SCtv7LTRKC9gY2DGv0yT\nUcd/H3QhC39KANf0EpNTvqGD670jl76KO/OHF19xqBpToMamZXCnAdMu0LRy\nbedzhOwuy7K5bIHSDe2FDZN4x7D/kPRK7AWDMO+1cli1o2p4a9X2M1CJZUrK\n0VWRMmDnXOGkjwxvOEye6Vni8osrBTDpaGI7X7eKKjq7/+ouJHl5ocEw92Wv\nAHTSQ1JeEfFru9XyPcRlMAoEfBM/5OK2/pLbJjIbzv5emtPOaETyIndcosrS\nXsuSN3vanms+ZOUgXlEUM8ea6eTDZWP3QcZaXmty0Z50LT+p0f8Cx6YT6rF0\nyvbveouMVoAKY+ro6uKw9DfBGHKx+s/S6XKhWj68aA2pXGuy6vO/AU+fqynk\nmVabQKxq38+0jJwW/PV+YpR407w5zCxKH+IxFIoKptpQg+XDfRytKjsAUvRe\nWh4KSwsy5NLtcSCvddkpfwLJdSawMoNXv2XIeh+LW3O7unz5NEsNLFV4Blja\neoFOemnXjroRg1Rmnzvdt3I0kUwQ4m/t1qGHzZuCnzzWE8EQ1bXdKu0WgdYT\n2gZGaqX7tJwYNngvgV74VBkQ76LwWJswmL81sgXaAnNMtCevS2buYFBQos5L\nEMZY\r\n=4q1p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0wicrJ5K7BQzexPCA2wtGO4eQOPBgvIWbfyh9kczczAIgQy4qkPR9p2qG2XVqnJGFpdU9a5XUQM7+VLZv00H7LOM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829104519_1535539655171_0.3824641658370107"},"_hasShrinkwrap":false},"1.0.0-goal-rendering.20180829144611":{"name":"@atomist/sdm-local","version":"1.0.0-goal-rendering.20180829144611","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist, Inc."},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.2","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-M.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"bc941f6c37926c2b77a2c06aa54eaa2166ff8563","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](www.atomist.com).\n\nHere is an [architecture diagram](https://github.com/atomisthq/sdm-local/blob/master/docs/local-sdm.png)  (TEMPORARY: linking to the raw image of files doesn't work in private repos)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-goal-rendering.20180829144611","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ktu5KPlH9EwoWwxRi1jPl48N4MD7TCI4NTP+oMdC73XuLyilHwcKTiMY11CJU2NrWdpQDt+Q7z34LMEM6p91gQ==","shasum":"70a15904a5351c8611eba1ea47f62718194442a1","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-goal-rendering.20180829144611.tgz","fileCount":357,"unpackedSize":1240357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhrIdCRA9TVsSAnZWagAASzoP/RJBvdutFWLXqk0HffPT\n7SUf2C2pyskqKT9xAinqq9UHoFZZ0AWIOlKP7rUNePbvEEtRbfF6QO4qf+2L\ncuOyGTaLCTamaSXCaxgTX6NUQfW62Jd6VqI5VKTW0NaxiF39hSF3ha6o4X3h\nJZITk6UrpvQbOUHW+/P5UePucw/QkYmlwH3B6/QN2bT/hKDJPEBXOnUlY14J\ny5FjaTxPpmPpxWpWfUC8le32N0u6jBotmjbQ3ubI1PID3GqCu544cP3YGN3U\no+fV0pXG9IXdqHnlRxhACs/eEyCFBUkZpLczePBrZxcOW42XzGItlJwm3U4i\nZYElFPmSm/zofevtDRaRXsUCjghwz3xig8UfrV5nUKS8JITsOkrzWDUC1g6v\nnyuFdz6y0BnzoQDCcCTTtvFTSb4cuEAbxhraGSc57wkCq/GM3vzUcQnqsPDd\nGCfK6SDgOxYs2A4rK8Ieu3nMVGScjk11vVrkE4ngUBL42GhQ4CPy91IjjWYC\nbPWyhXQELreB2/J4/f3zmMsGXfdCYuNUyfw7pXZQLlmdmxFxSO+KJfTyYpB4\n/a9VWRCbcGrsDOIHRbWJoEg8pCRxJrB72QpqMZvlRgAlgMKWSNm35zaRUhAt\nsV8Xp1iK+WzLAFs3ACG03jhWYnZmbOkLJUMJbvPFRW0/pPkV46xJK0eStXj0\n6scY\r\n=9MXX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICsNQanPyM+LiEnLzkeel6xFXSK0yv6rr2XFJNJ3NO4bAiBupK3HdpcMEGRQf0BN56OYv2DxOzETzb1Dec6KFaIuew=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-goal-rendering.20180829144611_1535554076195_0.2216339220062704"},"_hasShrinkwrap":false},"1.0.0-goal-rendering.20180829145348":{"name":"@atomist/sdm-local","version":"1.0.0-goal-rendering.20180829145348","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"0535858ad6ba6c92f0f2a84b5d96811fe2762384","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-goal-rendering.20180829145348","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ggbf7/3lcCuvABpmUiA4gotJmc0emIbD+0vxfjTPO1nnxZdjiN7yAXLCvxekszNc0fUBZgRHE6LxIMGtCmwBjA==","shasum":"29363db732de5a7abfb72fe2145d02c5385e3b4a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-goal-rendering.20180829145348.tgz","fileCount":354,"unpackedSize":1251811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhrYmCRA9TVsSAnZWagAAczwQAIUzKZis1MlTpvnsF9y5\nxPyNYRdChftQbeNKL1t/PKHAIhlSK1Ae+DUv3lUCRbYlVGgg1dd/mlFt5J/Y\nIgNd//CTPfVQdvxsCHoGxltdCHAbtsDdCqAOXXQq4azQyYUJ4wkwt22EiUtQ\noMnLGURgL0qUe7zK70LI+axlfWuBqE3+10L8fw/pbcC3kozGMyqaC5gaFCjs\nfeoQi9dOLS+P8Fm8YKDPhVA+PKmzfAzfns0CcisZdRak00ay/BcwfkN/lDqL\nPkmdvb4goRf7/Uht6IEVPeieNTCYl9H0fihH3DAjKjM4jDyzf4EF7kJeKzp5\n4Li1r8BLun86asit5pKnRERWW++baqm7zad88ZKsl4DmAsCEpmzREcQVT6si\nUdG4tCCAlBf6UQuYhTeUzVlq2JESUJ8EzLXh7r1tQGoMibN7gI2fEm45KPiD\nhFCLM6LDYDdtUnE0QmHjYUQ32WJntKaF/+0pq3X1Nefqtna4krkpIMlvKNpK\npCd+tCJKlGCOx+njaVAJSk/cwQvCmuBpp29w3U1QdErIvTSm8MgrsZJstoyq\n2/AIgwb47niDBtt2YO2g7xW9nfu+cSSfJP+YPLk0TibS6Z4bjMUmiykoRryW\n+l4co7hUxkHK6ontwtG3dmt5/SpUvInBJCHULCp2HkIVAVVQUOFdhEpqFSfu\nRhvE\r\n=gyGS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHaB5MnyueZQNB+ft4z8boUwOXVsXCVs07CJ1XC3dvukAiEAhXXUwp8y+1ezXGj9JSlGCQDqd+l81GWynjThpnt60kw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-goal-rendering.20180829145348_1535555110147_0.4533815574975273"},"_hasShrinkwrap":false},"1.0.0-goal-rendering.20180829150610":{"name":"@atomist/sdm-local","version":"1.0.0-goal-rendering.20180829150610","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"01660eeab16d55518e4d30b90ad37d4cf4c6c5b2","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-goal-rendering.20180829150610","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-mf91BJfP77fyCg5uomgNINcyZG+YVPZko54tX4RzWNKExiB4zorOFOK1Agel+XaJNjAIk5E1ixzS5EMLDjsqmw==","shasum":"c76583a4daf21495b77c820f6dbf667f089decb4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-goal-rendering.20180829150610.tgz","fileCount":354,"unpackedSize":1250426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhrbTCRA9TVsSAnZWagAAnPoP/jxYJLZyquZGv8DshITk\nTXpr3bEzz2gHq+Ap6zg+nCVABjieXMFQJz0OGPPA3Eg3rTDZ4PboMqTxdhs7\nzt6vr0ApM9vj3oudbrPeDnE0nHSLRv05G/4CyzlWzastZCss3UQs9TQ8Axdq\nlGtabNKlJYy1D/CQJuwJYSxRiZUxpOciWB+j7fyDfnSkljRBVcTSrBkM1aWu\nqHNvv8C5iKu6v+AYPxUy8uEoBjKC3u5GK6aGWYEYPWD9LsJOpXKQkpulBfkn\ndKS6b9VGOw8vzlx45EyVi3ONiyo7HrxHnmV89R6Me8GBWZ1InzOrRliEdPUF\nQnLmQvXhGll2S3A7VuYF6TMat/CDkCb9q704l9efdll+nsfqJ4FUgQ98a90c\nMU8tN4IejCKms1MgfFIQxQ1h5bv8bcpnxM6gfwBo8kr8SRmlyxpxybrHqVU1\nlmSwL5kH6TNSYtNaXBMuEcc4fL6lQbmSVNcJ8WFnWql65Bo2rBJEWh4C6KYh\nhLn9aPdktOm9gbmkpYkKx37Zyjl6a+UY4CYgB2OtodWYbuO3D2hiMQq0eL6Q\naDl7LC6Yl7pgH086KG1Ax+UP0jbUIQTHoIOvb0yFwCb76n6KAr2EDxqx8Z/Q\nOmnn9YhO5TovMijFAhPBmvxt5a6sWhgQhaOJaHL3NlxsNKraUdB41WOfQbe1\nZV6V\r\n=1sJc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoR09yWT3oquw8Od9qm+Zn48P8VPHmmMf+atYo95sHCwIhAIMbrNBWdRqInFfzjlA9pysUVM49NwPBQFG0yebtC7Oi"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-goal-rendering.20180829150610_1535555282471_0.01710669680542498"},"_hasShrinkwrap":false},"1.0.0-goal-rendering.20180829150809":{"name":"@atomist/sdm-local","version":"1.0.0-goal-rendering.20180829150809","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"2afda961861aa2823775679d9988f3773384474a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-goal-rendering.20180829150809","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-2+BSkpAClWSs2fJMXXCScDElCv0Rfj4Hjy9khSCBUprcUVoRhS8uSn9cR588KfG4Ehwd9l1yeCSZZMFyrg/Fnw==","shasum":"7a6bbe467a31492b6f536521d28a4afc002bca2b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-goal-rendering.20180829150809.tgz","fileCount":354,"unpackedSize":1250797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhrc2CRA9TVsSAnZWagAAUqsP/1eGQPE8xWdssn3kJGtR\n4yi7VouTyR5SOhf7fytBs7JrS4ZTgIMGe5MZJoSFYehGb+cFn3vpNWZ4bdOm\nJXcjQD6rUfCnC1uSMpkH5mQNQQIQUozZm70cJnUybuukwpymN/M+GEWTDPw2\nHA1zqPmt7ShHujwf0ibX1IimE0XPBHrVzq6A6KyoQr+dgxxKubY9TAw4ItWi\nkXgGl1+86tTTEQR1AhPCqXrNhpnpSHKCOQXzV1USuv8qL4T2bekKRHo+PfgT\nV/faq/EfxO752OdGFC21UZwmfbVD5bqIIqVxBkRBMP4qgOGmIFzSMpXHudJk\ntZdRNfq8d85OoNxDMElrnVKraMYQ6+Ukd+c9GDq92pJSoqyofluMOsyLCWdL\nlM5V5rNSmEjKfXYc+WnjrQggiksntDHE3YfBoivQjnb0b4U7JoPE6hcVyk6g\nBReqCHujc/5UQsc+8FVD0No/zOJEGGJyilqnzbjrGLLuzgChwFyLjLKGBnys\nBkO+uez7kXfiXXUonUXtbRo4Sxy+Wr6vYMHcbugBQrNBOm/gO6lZI7JRB4Jn\nuPqTMICmsAoHMbbI/z5D8ef60pO/hW4kJ+/fLsSo39YVbhLxNQm+QgUbv2HM\nMVHbJePhx+IFkkVHSA99wlaxDINEf6UvawINvFBCtAjHtHUuSS3kj+L1L6zH\ntCpp\r\n=QqAS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDW4YTJnFRPHDmCYvUPw9KmLrqKlM+b16W2LiDMbiyu8AiEAmtQRIcRMSG79B1ZJqsOLw+InsQXDWo73gNQuxjiHqX8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-goal-rendering.20180829150809_1535555381521_0.3887461374681638"},"_hasShrinkwrap":false},"1.0.0-master.20180829151738":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829151738","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"afaaafc8359cfb8128c1d32732eede089674e864","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829151738","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-xOX5VGL+fTF+oanlfNuWwX7JOcU6DvQUPczW7uiG/wD8j3jahb92U3+29pa0dwL/IT8brpd031N/Jk7k5GSFFQ==","shasum":"3d53d89dc5000dde94caa5f383a2e37deff2ed2e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829151738.tgz","fileCount":349,"unpackedSize":1210087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhrmoCRA9TVsSAnZWagAALJEQAJhvK9cN1S0LtOH3qdZq\nRYS476a4ONKcOt6VGVuAjNyn1UbAqbKw5EchA1n8JX0qeZjKiAz+16dnINJY\nVdf+cQ8LPh6z/XTqG4hppynwxeZmStAkXtUYQ/ElPpn+kjKmBx14zaHQgWPr\nLcKn2WvODCFtp3/K2dRXqf79zn7tdopUBnoRSKjlE6x69x78ekIkiG9cirgw\n722RqUSCvPrzbZm5GpR/T9o9iTvjOls33/NMOs1ymRt+tSt5USGSjmh5iRZN\nfcIDX2dD+GKLE2Bp+BD628VYSJgBAfc6GS3EfRpLhVfQmDvEFYSaEVjdKjJL\n+3mG7XRt+V2wZPdT1Y3yuc+Gk2PErhPJdweseOIN/X+lgRBughCrF/FxECXZ\n9VlgL2CZtW1eBIGGbJ2zqHDnHxkF5nWf26OT+S6kEq02ntwmgK/wsL6ok0Ql\nfCia/g6ynCA7Ap4fDe2j6i0cLyHhNSbuC4pPGqXsnCx7hLCwgeUiumHfxH5l\nA1LLaNCfapkuFsw9QLey1Z6dp5HYeEAus6r0SngtYJ4i+Zi5YK2KmYBfENvn\npgs/foT76A2p2/0qHa7U7/Cqv5NLeyVu2um70swRITATIqPwYTqwf3Y05Ipo\n/boOlYWkUIwarre7l7c3jmg8YbdMC0LA2w193arxmlxSakOUYBp9upBHgOHS\n7OgV\r\n=S6rD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHItSF/RBxmY5wmSOXC/6jyrbcH8r3Awo+hDMsiEJfVQIgXquVn+BLWZpgkzhJmHUAoMG3pjq8WXymfWGqFbH1u3Y="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829151738_1535556007632_0.6243469080208655"},"_hasShrinkwrap":false},"1.0.0-master.20180829151935":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829151935","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"886884e02341c7a3b294010aa8fe9e2438da1990","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829151935","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8WXAqLu6uRsyoU9nws36x/whMAMDugdna3gJYB3HCs8lc7PBiVgxCUHmoPPvxNtaT+XBnw5vggfObpCTkEb3ng==","shasum":"3f65afc3d34a45313e939314736d44ed6bd96d1f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829151935.tgz","fileCount":349,"unpackedSize":1210087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhrpVCRA9TVsSAnZWagAAD68P/A21NqHXomyA8r4Iqn09\nyKjydC6n1fI9agVorZ490zkBcADnZmr2I/Hz7JM+VIbNNPO7M0L/4GnvYWTx\nIPvAdn31uoSSz1j9vd9VMhKaas2hS0E9cFEyUPF+qob24xnsFkUjdbeFrB92\nmNWWPR2AmI5E26Acqnb4OKtwX03E2fJb+Q8nQJbhSCfQvC3d3/xiFm6FpL6c\nTL/pZMeDvCsu35IJGJTR6HSTxt/3we2fbuj7fGqnKt9AGL6RNfRHFl2x4dHn\nMiyLpLvqJeMlvVS66XMdvXFXku7/Qelo1hntCJPn0214IzlyE8MglY/ZGqNe\nv598nIyyL8pNbXg3h59ob1BHR3yEoXgr5wR8eY61ML0D8cc04VvmHsFya2JX\neKtl/OP8dm62Drfq08YH3zmcfd4XBImR8SEsoR2AL7S1h49KSUtkXZFeO7ez\n90ywBRjj32hpFvW5lm0vDmnbhXDppnTKC6rEHWzXCzm8hHWoavhKc3ym7L9p\ncw6wOWuftHRAbPcmmCuT4L8n5K/iWLzJGXTpf8gUOcfNX35xMaicFG/k7JXy\n0RTIv8Mh7jjpWbAKH6+64LN5UH5oaFZQ6glEl9qD1FncOnW/fHqCfkObTDuu\n5FV8DY3fCDm2I13PFmW1aYWh2MmrSvn67XcvrZ+AJwccoXirmXEiB4ZW9yXp\nxcJR\r\n=6Wo9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJiKXq9gF7iVOwymSXRLAQaPN/re6Lbfd7EuHnKKu41QIgfRbTKhRlJVAspTGFdoZPkC21bFOFcIvTFMUECbvBG0Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829151935_1535556180651_0.44579030738222447"},"_hasShrinkwrap":false},"1.0.0-master.20180829153832":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829153832","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"5a0693297e47ab26721fbb1a8a761209d712a703","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829153832","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-bmsTDvJflnRR0EdNqNR5KGO3OqO26BXrd20YKKNczhW0iONU54YzlmOB83/lkNu8J2NuZKSF1rE3pEyb0lT1ew==","shasum":"75dbdee182af8f626e9e131e2bf28e99b560eeb5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829153832.tgz","fileCount":349,"unpackedSize":1210087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhr6DCRA9TVsSAnZWagAAYFUP/jaXPUmx1s/lbAv1AcfI\nW/vQf/Ix0I0wG2GBLJRXw5/gPpvzZmabviozBolULkSrD/w0rL0ngHQeb6MA\nKnHE9y8OQbp3PsjYgPhIRCJaCh2/+xDWggTOI226kTw/EFdljyNwZ64P+uaV\nu9tUkhQ+WhiOLPpMIWEHveHmUtf4ZPEyhjn1Rt/JVRGg68mTb1oeRiOXKd4Z\n32A3aeuCaemmw3VHLccjka/6Q62filZE8cXtC2zcaslpfzM7yaz6GJwYPZjW\nPIwfH/hY26/C6+InJDUXwjnckFyy3CY4W8+RLVh2EHL/IkgAaQ6qWdZOsREC\n+c9j23QRqzZ7kyNokNeG+flRe7U5TfWWG2gq34+0AQgPaLOcTScjl/x+E/NX\najti8RmFIaszSiP2+uBbYtFtrX5A36wIwmWTnTmVypdReeU46fQi8sNwB/ZE\nngk+oqGgZfrudNurL3a1yQwgbc0i0OUblxcKusCHpbIY//uv+Dex40K11XqP\n/03DIyZVpKHxw+q8/JxgoT5fm6yESyF5k/zBeAjF1D5tBIya0JfOQji4MJJj\n2KwmWYixKZn6A7Klk4XAbaBgGHGRGHLe8iBfTTC/oq5TY39EF3DyffUmTH6g\n5ylO78lE6nmvTpvcS13AePnoRWzs2bDRJXJqXtgWrPhzm2xY/vV1FzeEic7P\nC+HW\r\n=y8xM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpNCDmhHGu9eNkNnu8JttYBMhfPmYaFWuyig5e8UivKQIgJ1hyObjtYhqTtld8h3M9DGamA/0umcDJQUTnEWhe8/Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829153832_1535557250759_0.9831038256944515"},"_hasShrinkwrap":false},"1.0.0-goal-rendering.20180829154521":{"name":"@atomist/sdm-local","version":"1.0.0-goal-rendering.20180829154521","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"6f7358ef1075680af68ff5135d041f77ac08191a","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-goal-rendering.20180829154521","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-1pg3AlIjLNTNURFQXQTPDlt2PfijUuklNwiIKmOpe8+7kgb2Od4I+r05gK3n+YowZHJBRZB1a0JVIfl/OOOaqg==","shasum":"4521a1a30def968a499ba1b2df80f33e8c1996e0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-goal-rendering.20180829154521.tgz","fileCount":354,"unpackedSize":1251206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhsAhCRA9TVsSAnZWagAAuhQP/RqdAovSX0ZoAjdffyWj\nRs2oYQiA7U4KT7Q/1GkUY3L0hJN5fawRJ7f1k161a01YRe569yl7SQKjSoMo\ndnlPwYLlwwPyZfwMSFRF070SuGSBFuU0ibTJADz8Bmuzfys5JvCJ0MjzSUhu\npea4E6CzLR5l3Hx++G0vWOs8WRFzTHjI74d4I9xEKFN7oDQ0DjHdFayOL0zN\neHflZcCqz4ydS+kQlvLtQIXF9jrY+DOeZYRrAaCVMfWrOS6c2mm8uMIz01Kc\nNhvS04g5k59h7tUBTDILoaMx2AFgaM4Tpfe+Aji5tOx/PlNNHJkU1hnwvoHN\nRX8pJmkzOmmxmC7st9/SvA4YraNu/L8wlA4kumpDe+6zPUBE8FQv4FsVs8ll\ntLP40tR/nACYWxTDmMRXARslJFY2ltsIBibGg/hNTteBFeOtQgOBNKY3tvD/\nF1VSbB5uG/xp3oTk74K1sEqeYythyS+AuaM+90w/d/bwuQJl289hGuF00GbA\nBlpiAr+uRLbZPy5AobsxDL16u7Q07def2QeWLZ/0BxjnZvRq8lCZ5iFJcg9C\nZooUMA7K+Tnu+PTd3XItdLZW0jQl6/t1CMtfy3GRTsrQ9Z+Ukv3kLmePJ/IE\nq5KIwTru5XTstupr9HjcONtisHuwA20hbZFLoUrOaE04xe+HTk6Uh3fQ6in5\nqnMQ\r\n=yfkI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/cKfbML/2rmzq+DTL9hGFLrnZInQxKZfKERLgNBZiwgIhAKpDCEYIiGtNUV9S4rlNEH0pDhy5kYboEjlNmwHbe6LK"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-goal-rendering.20180829154521_1535557665183_0.0863471273557892"},"_hasShrinkwrap":false},"1.0.0-master.20180829161713":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829161713","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"22d90eb62105365d180fb1307510546f0bc2254b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829161713","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-XcZ9CCbUXP6H9Jh1nJPn2EArDawMmdUrl6KsXmZqhzCPh3tYdKFBd2AyTSjHAW82kitx6pdeFiIdelELoiT9/A==","shasum":"de4d9c144f9564e250a3be2b68233fbfaeadbf65","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829161713.tgz","fileCount":354,"unpackedSize":1253605,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhseICRA9TVsSAnZWagAAddgP/1bw0D5andgcmDRu7r0D\nm+27LXJ7dKXmKebZFWxXEZp8SyLRYKCasZpVNKapSzgXOo7hfuUyPzIMr855\nudcqJ5afGIb3OIA3+/sGCWPQOREhBaZ4tr4dB5hYjprFEA5enI4WS80yEp9s\nDLInu5DBhlnq19JFIaw5SuadibVY5trZwI8sfnobnvMzJUZ8vW+iUXIL54qg\n7I52HlAPJAy2WWNPyJEvLodpGgLw4/asp+qYig7kL3R0YH7Ftr0eiFY6zKAA\n5DbAFjoLsEYf3R6TM0DlknACLpl9Hs5JgZPCUMQ5Yi8V5XU8SnHydbLaMVeh\n+YFL2ICmyybXoh8NjtUUKeSKHDXMUj/yPofP+Avb8JM3yrVmM9l7GpdCpXMZ\ncy2RdT1uCxUeR9Yio0Splomdz7OlE4Gal0KPqQsvuqeLP7MVI0amQpKijV+k\n+JZLOznHLE6PR4ackwoVC1gjc1jfqfjS48vtWQYEjhcuIbCv28zguR7jXJPt\npcRSiLJ27rXs8WY8kndeNTF9n4IqJrTwiay+3izE9CjoEVzXwkznI+TVvs8T\n1IXElsOV0rJs0W2LAlYYKS6I796nPT8GSyD0W3MFMQCfVe+9aWXZFfe1ok5Y\ne74q8OjU9Ij/LQTufSl8p2q+dJRycPgfF5jpPir4h5nXbZ/G+GyeABXOYvbJ\nWt10\r\n=+oxE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFuyi4LVhiTwv/sfc1uuVrBPy7dnN1sDO0M+vNbrZ/soAiEAvX5Sas3Q1E4y57ejT/P8LXAEOGEExeNgdd92S5UpnPo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829161713_1535559559798_0.6634503088567028"},"_hasShrinkwrap":false},"1.0.0-master.20180829163758":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829163758","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"1ff75aa811b552d113a544c9d068c208187f3a99","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829163758","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-AMXLOzd3WncYkOW8uRQw7h2jSgaqcZjSwlSPBPJUTLtcAen36/jTTY/RdEAR5teWsKG0GS/4Z4h5iDD5bakXzQ==","shasum":"240c6b7cf523cf5c80d283259a4070983ce920de","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829163758.tgz","fileCount":354,"unpackedSize":1253881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhsx/CRA9TVsSAnZWagAAouwP/RV+0z6vnjh8CuFME5fb\np1RX9up1/fymOyIQ/lABIQ/FoNB/VFRifovpE97mrULeoA0ntiv8qg73xxfd\nmSTZ06DcgES9L48Twi3cUaWVM8ZPjc5QAMlhEJtFHAR+TIs1sLAAtl35D5jW\nE+vLfUhRmwGSOy0Je8CLRXtzDJgd2BH19OuUTS3y6KYq5bNi0fpeSfWcOOaF\nBnkKoW2u+SaTp78vt+tyaWf+y4v+u95mmAZbB0liftuFtNkw3rk6Of6VMS9Y\nbdUr4Xsa/GRZI5kdqkixFHKgaff8BGrUk5kYPcfr9lL0hD4blZooVMtg9XoL\nTc3gM89uOt9UyRD8cwR41a0KCgzsdCoSwdYB01WURrDRGNfBhEmgaGDUn917\nUL5F/Jrx747CqD5GcxU0Yi0Xniv0WU3ywpC+MD0n0v4qiExIE48hfZZPBh0T\n7JkMyt3zRlY73hHAwMhJMOlBL5qo9uVbOSlv2UZEc0JTd/ZjaVL6WCLSfHmR\n7D+xh1Ya9tMsBfJkfLudLKy7MUzFp0oVC2GYQKv7MNpASWQJTJ8tMVjqbqnM\nC7RunZNWW/USYiIo6ssVOayljayD/8+7ByjUmmFkaVi0evfLJkJY3Wc0PlTI\nS//G612hJ1fIDtEIaQPdsdI62ss4c94O+km9hPkUtzw0QfLGSJy1BRVJDnjk\niX7Q\r\n=YneB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3wbBPOqx7c1N8/l22/X1cbhTz+9FaZvnTdetbtpOVXwIgGZT0Q9FTNW7pJdUlTpBFcYAb9mKRFcWdkpSgQk0Uf9g="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829163758_1535560831187_0.17316453403004473"},"_hasShrinkwrap":false},"1.0.0-master.20180829204627":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180829204627","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b88dec9203bf203093a4cc12a79659c7dee2f66b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180829204627","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-4UYENbWOQZoCzk9POGDxGJ0hhP7bR4cUKmFAeoj+6yDPvjUceblOrf0WgianxHJvbcZdZRg0Kd2MuA5wX9xmmg==","shasum":"3e890573e2a942f14be56d02f9715c776e6b98e5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180829204627.tgz","fileCount":354,"unpackedSize":1257710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhwjSCRA9TVsSAnZWagAAcYgQAJM02cADTueygWisoGWz\nTzrBsoD/cOxzbEGYsUzyD5ZgL3QEWbV+A7eaaz57VEWaGFd4gafwwwMpr+oc\norYHpH7exABLU6pSnJq64hWhddJoBCogADLE2JVyQfymozobOENiMrYlLyla\nt6lYWIhtcwtxkpYV0ptTtmYkeSLUyoqveuG+B0wIpFgl7mTGCeY8haHMWMkx\nWjlviTpRJBItx0shlLfMrAQ3/IhZ+svi8V3Je1J/fMba9QUi2cr7fauTZKNo\n+0aePBla1JD9yxULx2XgIPunRIyDwy79uU3Ye4cz4fAC0rAsM9XEoTgRtCwZ\nW0R7p2pBFyA2T4qEIlt+B6uVlaGElBHv8jsn4tl0jWCmS+D8to+FtRQo00DK\nxCJPDfBu3o+EImd6n90E/OJpef2dbXoqrcZlLjLOYPPZHkft0dQefVLeGY1l\nn8comyO0NBtd2r9YTxfZ+qRaTd/s7PQYsmSOVkISUnABfRKhGEZ+v3AH63oA\n2EIuTaeNx+4GNs/0aGaXjeAQ4pu++PKLB+pRY+Qzn5TbB7cTrFWp/nc9XqC5\nsGLvdcCXpWTnf+ckPrmAAIy2lsD+0PmDB1J4pNalAqmvMvQ2oBMB+8cAvzxo\n/in/3WuYXUZXbmuN1SnEhEyWEhqYKoubBaMl+XfhYLIVXAgsgI/jDT26Y8jt\nFJFq\r\n=AVlG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICR4i+mivgXrzPXTPduAb56CV/hELaSJFX3x/Vn3sEeYAiEA1MLIzVAYalgBZARWkjgSjIm0NDoSeQCrHQYpy0t99no="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180829204627_1535576273678_0.8216436827899782"},"_hasShrinkwrap":false},"1.0.0-master.20180830082451":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180830082451","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"3ed5609234678345d77cf5463376ad89cda058fb","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180830082451","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-pIjRw32yrTi76rlduK9ntZZIBfW66c9dCvmASFsGI1o+LVpk1lnQEjd9pv48PkfdIGA8a+UhRV9SEED3w3BcgA==","shasum":"9c43da069f4bafb0c18baea1e8ea5ed6168bcca0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180830082451.tgz","fileCount":354,"unpackedSize":1255899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbh6phCRA9TVsSAnZWagAA3kgP/AnqjMMrth8OU6/4OPaY\n4pGCG/KsxdpbBZrSGXH4UMevTt0Sm7gCfcXGc6zIF/ALXqITqqVMWjS4LbUf\nrmokbgL8iaChx4pwTLyWuGAxUZpMJnyOyz96cHezcTsUP5nZlcH3gjH4OcFS\nPlOxwIVI+pJoKqCdzvpwjkNozlGVwS9/85VDepELY7T/f9ucyotHBcF2Ru4W\nbB6eLUVRAqTYY7mtGXDyA0fh0jdStoTSOZkj4SqqP1ACJImJS7C+WJLl0a4e\nIE/W04AfwMsO4Ehs3bi/X3KVYb5AdszqoluwlFgR217AosG/oIiTTgDm36yH\ni1e0EDAocUpYFEL6P8Pcg4+0wM5kRA10sR3Dii0LS1BkwyOzt0FTUdLxZTxB\n15BgUPvV12xmajU1e+kFoiBGXOH4IJO5ViqPyI1oSdRirnl4G+9xHgWJqga5\nzEESAktIPoIaPb88QhgjmSY/9w18pENlC5xkB0yeZeuJgJwNY2nMUZeTW+3U\nxj7SKy6qJRErI355IKynKWbzYqR98dUh/efVIjQ4oFnkysHzKr3cAMt5/hrR\nkZ093Wti0PnRBzLMalsuetHmi7DkKfLEJDVyoREjSESIeB5H5ZZu+JeDzZgE\nw3Vw9GIg37aJd37rzpCIP86Cmg5MHgRzfctudOF7usSV+cVSbaAq8Hj1p7dA\nDB5q\r\n=tfAX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAxkfcSjlT8RPGODgWzFc3U5f2VpH+1nO27MWqb2jMqaAiEAx5J2WTmctCUVQprHCR5UCHby743eqrMhEDSSuH4nqPA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180830082451_1535617632544_0.4216261240054435"},"_hasShrinkwrap":false},"1.0.0-master.20180830083232":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180830083232","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"59dc8289b2f4bc905473b77882f301d78f15b4e2","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180830083232","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ZfvvGy1a78ewHWVEhu7xB9KyCadrnUL/8umaF/eAdICBi5j4G8H9WHQRHVoY7hjvIqKDCOD7NTDDCwJSZZuQ6Q==","shasum":"d6537335ca52f1fa48dac1c26a25b2e1dfc3788c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180830083232.tgz","fileCount":354,"unpackedSize":1255989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbh6wgCRA9TVsSAnZWagAA2PgP/1SjQ+6NkhIUpL1YMJZs\nN/lxpb6rDGVOst+/k8HYQvj9Wv+x5uBswPgWazV7l7x2RN33RFd0/l0O4+Ym\nCK5xBb4AWbdU8zKQxC/+CztFkRmxapfG4HLZ6IFR1ThKODkGHwNWwTHI58km\n3Jc1b3KNRBovci6fx1AX47OMi8FPPi7r6hcQiVhVtm7wnjXVWREcLSTSpR+b\nWE+tUTSH45qnW93w3EJssz4mzOFwF8VbcYhd2Vah2z8vPFUBd1zS8bXtPDyj\nIJuFb7JyTYnkd/xNjEIfNrqMaIxzCVGYlZVO2hT4Wy5pvKOu22F7E2lX+L5A\nbnZZ9gsuI4VoRPS42jEJIFj0YMZW0NjLNHg9gLN6Q5pGSZ+IArUnMldqDdOf\nmmFfJPur+eYQH96KtLsuClO3XJSWuH+KbvmlEjk62HTRzqJt0hbO3orojoYt\nSj5Avm8Y2HhhV2jYHzMfQw53M0XIrLuun46qt52afaFAafIBWIWT+wOOhVaB\nOv4o2diQD+z5lXwPW8rlVQhTbLdGGM1ermMivDFHknXWbXVJVXzzvRiII9iF\nihVlouyBzj1hcWwBtChtjSgzItXIiV4VdbxwCcvO73/jp+nD25ay55Px/Km/\nnXqedUBwtMsul+2FB5f0QSAihpoGXdiPMs0/fqemmQhqctJnPyYIz2io3GyQ\n0Xrb\r\n=VSwj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDOI94vOmiabGbvyTU+knQciW7ClhmB42qxZgl3ST/QhAiAU3UJ4gsooQ6d/kQNqBqIr1Ju8pkNN9lfTtgwK6vf0YA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180830083232_1535618079083_0.6274808830694409"},"_hasShrinkwrap":false},"1.0.0-master.20180830112313":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180830112313","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"5ae1a837395a3fd23a9037db891253a9560d8da7","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180830112313","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Y0w8NfPw7tTQ63WLsmdHb1Ue7v9szlbLExskR3dJXofS4+ZKbcoULDz88AfzQvPM9m88eKOtDdcohjC5UhOSvw==","shasum":"fa22681ff736874719a027f12657f2784e21c9e8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180830112313.tgz","fileCount":354,"unpackedSize":1257208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbh9RACRA9TVsSAnZWagAA9TIQAJO6GDMw8TyioK62sD/S\n4RFvaUOWzM5v4McVi+kRJAWmghKJjkR7zgea0EZXhp0/Bj1990ytJC0KHduK\naXN6VXfQ9j03vnangORCw5ZYTI5xkuLG9fQvqrUy1GCoEBVmdfFcvqQnglTh\nkdXLiIXVB9knTmQ40utrdPdvfpZeU2laOtAKdwyCUhlCtyZKkbejh/6CVR2c\nO8xFnA2wfGUHYsoEPUBFRGFls32EuZF3SESeIBp/Wlut/yDlE1dN64gMhRP7\n2P1QksSVGKFJLkvMUxy7/9iTlWr1zbniCpGIMf2ws5bkNNSjAE0y3CFETiTs\ndiBlfxexSglXwy80/44PKBUP7ClE7UZJt3mx5su71LTniLqEsGYfETk4+dwx\ncSSqImn9upBcQldlTQmzbgKkVVePoKemjXCGP2K/SH3YY7ggADnrVf0qbUh+\nEdEVkAzWtWRw3kbqmsE/mshaat1lblsLJGEfwWbMUGDM829noU+2rCLzV5dr\nwwgyZYTMw8+53vsoG410w45UkkvrcrLPAy9T0/6TmhfffbWA/WgKDEBS01Yq\nDFpdFgAfQ7woNCyB/B0ZHA+BrszkbnjPmXCW7nJ7gpolCDnckN2nqVzGl1yR\nnK3ZvdJvkhGJmXqySHrB0R3bokKXDl+7SHwkMBeAngxxJK2lN0TIh7TRvTWy\nXcw3\r\n=ONZM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG4DdkXbEmgIz4pdGDv78LSVbG/5RxZVzrJxHMajRd+KAiAoNqgNyBSOi6nPYHsIT2ooG7ja33CDhJ6BRJV/swyRsw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180830112313_1535628351829_0.5411550359099271"},"_hasShrinkwrap":false},"1.0.0-src-to-lib.20180830143204":{"name":"@atomist/sdm-local","version":"1.0.0-src-to-lib.20180830143204","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"469ff6f00b1aa729ef375390e46e1c53a259f479","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-src-to-lib.20180830143204","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-aru6lN7sOU9DP87Uma88brZTtc07oal3wOGOXaaxwv+GUX8W2ypu75U40eDMzgQiMZ3GMXNWqd0egkHBN97jBg==","shasum":"d4835f208b5b0a48667e77a07c763feab357af3c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-src-to-lib.20180830143204.tgz","fileCount":354,"unpackedSize":1257212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiABhCRA9TVsSAnZWagAASnIQAJ2n0E3APmk8o6bhio3Z\ni6ZtL+IxsdHZ3Yt+vsGtJ0/P/s9kw06+neUreepmFiF3Mpic/g5r2xCE5HWS\nkU6rO271VM2SMrSVHhljgaxFcoFydQ4SAnoi1jRVXbhJJOPiOODZU+X60N2n\niMWZPNfmwxBZy6ug26TDap1aumdAzimWGwDXPje2/lK4ai5A5zv6YPucUlBS\nSSSUkgPYzunkjWIGEQWz0tqqfZon9CXSvG/GCAQokCdEC1bRHqkGwkmFtF8C\nUOlDWgdWOgUacRS95Wd7qF7YangGE+FQLTXP8GQyRYen8JGd04wjchOrFxrQ\n+MQsBNKF7Z2V8m11vCxqidY5ubaHWMvfLV0nEivOj3C1Q5bRKp5nlnZ2zOHI\nttXzBa6FZQpzCkIUTQBcULlDRG610WwAMntfuZfcGm7OQqw1WhSHN9VviGg9\n1nFi3FDU0vj4OhwYcjQ5JVmJ8zCF3H1NlV+bWIJvRowb+BepXdZ62E7LrNJH\nXHWaV8ood2hONUPthKJIRuSAeuryw5O23TbipsAyQD2UWE1XylWsM0rZdP7Q\nc8SS9HqOsum7dARiba0c8LT1tnqWb67RwQJiUqfpfFiZJgPpZdy363OVGf54\nk9ytADsQU/5O7o025Hwb69UDdJB9UcNqE2/jgNeVZF5ZHshZE8o5B0448FoQ\ns7Pc\r\n=3pqP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdNny2vgAj+uFo6eM4dNbEKzPDfs1V/3QhdqfLGO+vbgIgeg3dI9JLavj4enUHiF0GXWpTyxV1xzeqYR/OhH1wVBU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-src-to-lib.20180830143204_1535639648551_0.5591168179378461"},"_hasShrinkwrap":false},"1.0.0-master.20180830153511":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180830153511","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"fa75187c617cbbc07336aa2a27f3ca07af05cdab","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180830153511","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-scH99G7wxhOYmRYTN+EpbWxO13AafRE3ddYz8wctpQgrxeT4b/bOWCs0jNlPWu9BeGWlsd9QXKzHaHPzz6dDQA==","shasum":"b95c39f6412fa6ca27992cddfa2c90633f8340c0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180830153511.tgz","fileCount":354,"unpackedSize":1257975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiA9DCRA9TVsSAnZWagAA470P/ioh+dXvChCD7GVIad3V\n+P1Vtema+ywSITws7rbyqG+EUsCuD3zfnJ6C+F5ucLW/eg2iyXTC0yrESopF\nPk1UiLZjzaxSw+KND1FxOoaBU8pCuwiEeLXqY3MrJ4Rdzox85oY8vsy7XsAs\noJtrUz3EJUvxBdkhqnnMM+vCw0Z9+zksryt2UJ4MYvAbMX+LWuiK6wRfM4rd\nd6IC7EA69CiFCAJDWYDID9EplbqdoLi2AmFZcM8f9Q6uq+g/uzbbBUGYAClQ\n+Te/paZVcrQy5R8O/1G4Q4ZTSn09sFyvubcDYKD03jL+HB+aqfvwdwlbWdmd\n87jhviddfk+WsciZ4tZaLRCHBd3pGqNDuXmq2uv2egUiHow4F/Hq3CSHDsGO\niygdy2mypF2kZb63Iz7Kj8tmFPvOBz8HUwAGFLLxha5nTncH7I3og172O7aX\n+0/L+Ms1CligA4kSJgz9yyKTGUaD8ZhJk6QN3N12VsVJM6Bd49Q3f5GZsB/5\nS4xDaxLqdUdf3h3J9m8bueZJ4qyiMCrhkIgGY01w/uRaCbYfOKGmo8FnfFRl\n0iy3QekcBzJmxArj+pVhUtZY5IghQW+489L0+Rg7bZM7aCf0Fd5+PcochUTv\n2tr8+CFyRHC0iz5atLl2Q7ATkfVcCoWUVYEO90BKsZkZmoKnRmg6IorzQXdk\nW/j1\r\n=G1tc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFhySLIi6qnjHFCgUABJGs6wW2fM8MxmNHFYIJ9qJTaXAiByaYtCjfr8ifHMNgmRGbszr8V7vdODz9GkYthQ8Ti5Lw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180830153511_1535643458234_0.7391168751601582"},"_hasShrinkwrap":false},"1.0.0-nortissej.reset-goals-command.20180830214056":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.reset-goals-command.20180830214056","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-local-configuration.20180829093544","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"4b7d47488b5445a67f578c9b81e814d4208ef88e","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-nortissej.reset-goals-command.20180830214056","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-2G7qVKckfheGJw7uXRFW2k5LtfC6UXiTXs0h3daY+l0S09dbb6mIpUSyUGlaRWxnYsbcsSC7xJ0S2lJ8IlLtdQ==","shasum":"a70b27ded5d03e71c584eb6a3fd709b1b547e6ad","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.reset-goals-command.20180830214056.tgz","fileCount":354,"unpackedSize":1258656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiGTNCRA9TVsSAnZWagAAJUQP/2TYqHEBDcQIJV95nlvC\nFB4Qwa7W+EHsHYXNwkjLDWkj9OuYokBHkDC/2166z/CcgY9u3WNAULuY2ckf\nbgsEylokdu8a67LzKuCbzVoNAU2Dotx2OOfxj3A/7mhR7UGVNkl0R2bwhhhR\nbyIXDKhRxTuygTYN84/tsUWSIe+xH2/Qn0Hhy+MUnrAliD2Cf52n/B+TXpGu\nU7glLdN71aVSTjMpfS5j0n0FgAZjsgw87qg5ZOjTP0es4lk6oL3/PvqZms89\novXXrxGFu7ViwwHiISfPZUGBsYyUxr+jWWbZLDdx4acpyqk/523yhEz7Z8yk\nIbjMPnOZjjBV7vmLO8V8cL6uEuSuqetsoSTnvSJpPa+igK7g7pD8RJeXOWry\ns5KtYN3HuPaeOFtIj+ewTJWV5FuRoJ7ckHlRFhauBHeAAz87EdAOILzUm25k\ngXSRGuppNEPrYOs6w5xN9SOdV97MnAtCP/UObCeYWgK4glgSOvxRFKG2ollq\nWj8u1JOWnvOVRsG1eiIJLpAH6zO4o40+ECoAw925G9QK98e9s28mVg4UUanw\nhfovTlebyE92+n18A7h6Y5CG2tOGpyZH5x0iC9lNjCwNHJZqW35jAS0suaeN\n8iStvwWpwwsASItT/6+VM/9vbZU7bytbOcJJoXf5Qs4xYiib9bK7p/YxeAd5\nsIMa\r\n=MCJc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpHtLDRh+YtsKaVvEVCCorFbm/Qpgvl8KyqqSls6arSwIhALpIda5WkXlBwgc0o9MitwlcZtd6dR+6nMrVfyxlDL63"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.reset-goals-command.20180830214056_1535665356151_0.25365273963273727"},"_hasShrinkwrap":false},"1.0.0-merge-pull-requests.20180831160946":{"name":"@atomist/sdm-local","version":"1.0.0-merge-pull-requests.20180831160946","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-master.20180831073802","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"33f5cd18ddfa6ba88dfb0abf0bc44931243bf90c","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-merge-pull-requests.20180831160946","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-mGp3VEy+PAMLMyFpWq9Np3Hq8bwnnyZWjkIpUhE2LlFV2t9aEkqZgtEr5bHfiIS9WQpJjaYDbDd2aNi6k04hVg==","shasum":"70c44c6c02eb71a9f765f682de5470920662a73f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-merge-pull-requests.20180831160946.tgz","fileCount":354,"unpackedSize":1260571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiWi+CRA9TVsSAnZWagAAenYP/3l3kKOr6+kwBGlgZBIp\nLBLxyGMuiD1xj8fid1kwXhQX/xSAaFMlTjcVb1qiR1uJWSNpGpdGaZwEA6tQ\n0K8ZlUI8ko+9HiQ4MSXkOKT7+oMbOysfSdPdRXBVT/cxa+Qmr+vHob4cHvbh\n3GDhqFLt8wIyS0MY5i8AE3oOvNmnAC4lW5t5uasWHyNJlIwXZnV85U8wJTaj\ntCjwhg2NljAM9oN7Eph8WTA6bNcEoqjJI2XhzNXnF7PeiS44PaOLjbUDDSPv\n5VtPELQkFqk7EThNFbKfND0aeOAFesTEuqFb2IeudloPrMokLnbFIAk2P6nf\nwp/kPkdV2jYq+zcRTR5rnBNcgNgrq+CgO73gp5k5o6sgWXAPbivyWzkElT7m\nx9YyuWWYV/gfjxKQpXVKWz4YZ3S5RIU9CXsPFtpxmeB3CdSJd/jqhgC02pjP\n/0DVCe56wdyrmLC0TdAQYFNOlr0K7Wfks12TXgs5DTA0t512pMHVegImtWbE\nUQaGf7ne5bfvMJ2N7MtLDbM9g5CLKqdkKPPtPWabwfpbCAbbbkhgUQCvlYjI\nBG/lL3JQZGxmRjAFREXIfxaZp590wnjIMpb2BHtdL6lU1QeJjmM5C3xBCra+\nyvdSDYNf3Hc4Emv2AdEDf26Ucayhi5EXED64Oq9YkjhNnTeIhyvBdYxEgdc3\nxb3z\r\n=SnLG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCplWE1u05cnKkNx1CVF4a2XBu/j40P7VGJAPcwvCDIAiEAjt45ZDd+7L68z5QRQGxqwdl9R9mMiu7zzU/WTrjRxDo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-merge-pull-requests.20180831160946_1535731901019_0.5141873832693158"},"_hasShrinkwrap":false},"1.0.0-master.20180831180143":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180831180143","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-master.20180831073802","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,src,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts src","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"53b98f13037d2b32451901edadd9b17a2c966b8f","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180831180143","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6ejVlT7rTUrg1eTR41t0m+gT4NxrKZMLFWT1XN2CChIR/hIQHxS03VMcIn0EMmhTL09hhbhleyX/E4JiJiiHOg==","shasum":"a6fed5d7b6f12e26ce82d0c63f9aa1629ca0efa9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180831180143.tgz","fileCount":354,"unpackedSize":1260684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiYMCCRA9TVsSAnZWagAA2bwP/iHVybgc8RInuwD7soT2\nn4BposeVgZe8VbX44ez8IlGJVCCrEbbo2nYuNpCjCAXmA90LFi8uBunyuc8p\nTfaeG8zOfOgBVsi4Q+dsKaOJSSl7fJXqCnFbTLJ4tDISeSMlHb5coy2rXere\nGlxw1c3GjDdXie4Pcxf+HXIsZZKNWh7Nj8+yzNsjJYjP7yW43htu+LrK0TAR\nzyo0C2HmDNZFkDCQRq1i282oTV5DzY7EZY5cSML9jzePq8YexhmZtIvctg+E\nI1CNWd4r1CAyOloahH829XjzKKi6A8ZVq2GbPxVuNmHSAGyS748bKd/9mwZy\nZO6XHhSrLrth8LKkk03pno2TKsVSGgGmFCSI5koyiqnPEylnGDfKdHu3qLCZ\nCf8lHg9hQU4z1G61GxNLn8ijkIIphdLLWBzp6cQBEBIBT9K6bPMdW9wutvkW\nlbfjvxBEI5ZY1uiYAXY/ZRipgBtpSniAu0bg4dUcmMJXLXiUUbtD67qkOI1p\nDUePhwSvslN59Nqp2T52MwxUzjBccEZZmeyceCZY2FHTr4t16wJisOS3hvfq\nhrCJPVT+sg0l/9D5mcVX9yKyWxTdL9b6CkkqgirpvjKFuBaCtItFDiH8MmMk\n03h02JRNfEjgW6Llx0OpKeBEVZo4euz8d/9yeweE/r5wDVjAQcXsTFlMkj0J\nj+5M\r\n=vwxz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCURFc2t/fzWcogmJHtHp1GJK5EIuKoB29gqbBYX9qTjgIgeL2WdEgHs0YO80wfSw0g8bocqxMmRbrINJm6u/8Y12o="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180831180143_1535738625539_0.690048587935798"},"_hasShrinkwrap":false},"1.0.0-src-to-lib.20180831184924":{"name":"@atomist/sdm-local","version":"1.0.0-src-to-lib.20180831184924","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-master.20180831073802","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"09207a05cc08335032faffff9fec5e9487ce8a18","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-src-to-lib.20180831184924","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-uJCM3gyRy6QYtMctRgHtVrRR0fLegEVRnzcsHuFsjNvkPC+ShyKpWcqPZiud3AeEwAtlggIJgHwOkMHwf/GJtQ==","shasum":"1a2d2c6dfdb13767d998ca5f283b4c0efb458920","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-src-to-lib.20180831184924.tgz","fileCount":354,"unpackedSize":1260688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiY4nCRA9TVsSAnZWagAA4pMP/ig3lyxSb7BUZQ9IjFOZ\nFP/CjGTZEsNcmhUvA2rffzp098MRJA2WyDpCv8gthPtXXMDNn1RvtiLjBKos\npNzgomPhooRN1XjKeXVqEyAE1LtWcE9FkUrvfBcJNHimlI/Q5DpRGhogMmom\n2cdTkOTulrmbzQ5YVYDOeqEPp6ewKCxHv4UU0rRCfO6FmG5pVLGzs90G0qKo\nWScrNEdkBb+2muZPv5Bdm31cLvZZTxyKEkapJUyMrrASnM1dGRJer56lmZRV\nfKuBUn7m3aFiTBwPbN/3Bc64ViPfC2n4SzAkS5L/UcoGR5A5lw6UBzP+29O2\nfRpB20/ROTd7Ww+V9w4J81DWfrLKKP0sIYLhz+GgEwud+yuLmccnL+M/RFXc\n3KafVkeswLNLXF1d2VD0/6FWinmeUFO2aLqSK/pGlvo4adSZu6dNS8JlK14Y\nHmoliiJ6fG6ab0jQUz7xypxYHcX+Ltm11HRmbBgoq2UIfO6n84W2RQ539YU2\nwHSPdQuhFa0oegIt1t3v2HWOXmrhHWtincqhRuSI72yumxw8MwWvKpqz2rC0\nExv+guNAJCGNRlXuN8LXBCVdJ29CnaHfxzKO9kclEDwu7SMczKuw/fVyMFfG\nELxfRQCCLqqmzMJzb9A2dy5+B92z4S3OKJdEqODjcNbL2X0zEAzGBBHNjtyZ\nL4nS\r\n=/2EB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6nAyEYgW6p9K2QwAlFzJJynh2srkMxHaebbOxYIh/nAiBnrpnibXJukf0A+vq+ZszH+dkBkYTQrqsfRcd/jZXhww=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-src-to-lib.20180831184924_1535741478542_0.7439179171766941"},"_hasShrinkwrap":false},"1.0.0-master.20180831185416":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180831185416","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-master.20180831073802","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"41e25efcd6114a51f3f2a2edbbfc044e0f5f7df9","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180831185416","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-HUvr0emdZwYTEPCiW0AjQPtIkJYSpij8F2twps0AFkqzCk2SXGRsn6VG0qfkLWDa+tvVt7g9SC2DNEGkB2fAsQ==","shasum":"857aa8e7a8a36b50e94fc7eb6c44c868613bbb48","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180831185416.tgz","fileCount":354,"unpackedSize":1260684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiY9gCRA9TVsSAnZWagAAuf0P/15u/S5fQ0pQWCf4tb6E\nVhbin+2OoOoVSC4R14Ks/if3AAM0pmtXyp88jucMes5Ty2VTjEt9SlM7Jb7w\nNO6xdzxn5Ne+Uo1Pdnp7B2IJBTD38vFzGVpgnHUB24icv4AbV3sZ7bFaRcGh\nSWqD73YmD7Yp3Ip0OYP/f0fKtKCRwMvSg3iM0DR4xGcX1XSKcbW5fADm2++R\npNDPtZhqThZLZ2aNVJwr5WdcN06LVlsIwRq4swF9e/SeSpTRu8sFY8JUntQM\nOHIJYGPLTdsnpd4U0mE4nhNOtQ7zwaYO8B+cnO3wJZtG31JwA3z5CuQSI9kG\nONMFH1tA3EuSdCK5r61YWspXRkQp+qPsWsqFBSDFwYoYPZjGIw3QumhrNlNW\nO1BDRvF7VAW6JfVExzVVv7uwHRJAwPoKuMiyOY0Tch4XupjI9nCqozrlK9Jw\n17infEElKnHMH+pDbZxaWw7EhsTCNEi6/EmuGbk+Tfzy0T5tJDgBGz8x72pL\neXqkR5v1xf6BT+7cXoUym6bh1JOlCsZayU9w1Je/6+gGgww/XZggLPo5OUDZ\n8c9/5nSliP0PCM0TIc+ImtjGvtNMtuv8e0apCARlm1bNyR9baBdYi2WDlWlN\nm9CK2ohdXnUWvZ8j6t0g6dWFoLCbCB9RBCO05VGImUs/k981mvDwsWVGhBQX\niuKa\r\n=nKxJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBymHS7GorsjBRDVU9FBvQLdfx3mi8sj2ex1qxmmiTYHAiAL43roD3viYkwGfKmoVbDDwr68ffnuJoXpEsfJvg7Zog=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180831185416_1535741791961_0.7971965879704337"},"_hasShrinkwrap":false},"1.0.0-nortissej.firstPush.20180831233922":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.firstPush.20180831233922","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-nortissej.first-push.20180831225158","@atomist/sdm-core":"1.0.0-nortissej.first-push.20180831225656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"0bde81a1ddbfcd4354b6868afeed9dd7283c00b3","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-nortissej.firstPush.20180831233922","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-YjeTRRkAzHhEfiFqc3LvXizfxGtaEv5p71k07KyxgW0ap+daQk14pyXU8GxQHkGrQYCAgT8gapUdhjdT0bwBLQ==","shasum":"ca6fcf05309259e59e57949bc7ff33e77f9da4c4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.firstPush.20180831233922.tgz","fileCount":354,"unpackedSize":1260737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbidIlCRA9TVsSAnZWagAAfTUP/0oetpxQEquH6OTrMNFf\nChg/3KAhtP+GT+hg/ZV9C14sjEF4txKiPRM1F05k4B0/60c57EC3B8NA/XW9\nJBrUMbw9WTU5GL4wWFxwj0P4EayYeB262l7bA01UWL3JlfbomUT4JMsrrWNI\nOiZV1kK0KVyrUYiyJ6HQCHYCuhPqzV6N1UuAJmFE+NlSa5HTCxu2KkI3P60o\nEKOqJwEuGeKUN/EqHB+NByW0CXe/2p0+e8tHx1+XMge0TYfRcHhoeZzBLk0l\nJOkfnSrQxHk4veHZ/LE9nQP5S6WtFBStcxCG2ZF8vUJZ5mwQIdgrm0h1qIdd\nU6n/OIE8jZtCK2AMB0Ofh21Me6U2dtzYFN3ALmNG/d5Iq5VSgNgunByFiAxO\nID+dJJD1VWVLdJmeFbBx1g2CusQR5g7rqJfn7YWNfLcE66G5If5yIyPwyI5M\nxVV8eApiZ+q9CL1QQErXor06Zuo2Xgv7ZeXCqGWHwY3ygn49loihU1eq8Hor\nlO8+WTN+eN2WoPEHSYQ9+4QaliZAau5RJeWgKKKVe3QkiNMJDDFM+mSb/K2H\nnYEuLEFU8EtzdN9XRltdUI06Rx+v8OmjSPKIS8Gxd2tmSlRIYwLKH6WJ7f29\nV9PsDff+qCJnSuiRd9Bo8yYmO9RglXKP+XnfdCMoEUdC2NMSVmuec3Of2/qR\nyZ+Q\r\n=kd4J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYt+cC2NnsQ97CMb7/VZlf+TtsLmDcZ6nmkLrqZzJKNAiA32BmMRWJylXVIsu/vj1FnFlsGruJdRbJN4naIIiHZSg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.firstPush.20180831233922_1535758884897_0.7215912951058245"},"_hasShrinkwrap":false},"1.0.0-master.20180902134145":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180902134145","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-master.20180831073802","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"85b1f0c6758eda92e7d462cfbef78559cd25f372","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180902134145","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0W062MBPaFhkeu0kUas8JxeG1tQctaFIIYm735PvwsnF6ygvgqbwYnX/tQlWRquC0SaQ8V8zFW9UtXLrI30+lw==","shasum":"18ea469c5b82b93a20ec7eb18984259d592b99c9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180902134145.tgz","fileCount":354,"unpackedSize":1260468,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbi+keCRA9TVsSAnZWagAAFEAQAIpnr6gTvXMTdEkLupon\ncSPmYrm6gMQfXU/+oacSnEXMWwXYvz4TMaFR+fMGZJ93NFhxLPUKMUgIBDUe\nvNvi6lipyhT7JWiodZP57zEk9RNafzhZmeVQZWxxRgcIiVW4+S++aMbTC1EL\nysOWbJyC+i/vmV5uYZ1DA1y8OVrUrpkWjfJc1XQ5RLq6PSZo2ai9cRxatFtL\ndyR0tExpT4AqXolt7G0lF3H4eqvZlmoPjAuslcQrtyrWn5SfIBpmktDIJPMZ\nIvbmpSC4o9MxymenLVrlUe/8FsRRTH6zaHG5QAELyaaW7zhQAbFNaqlbjPVB\nVBmQwT9PGHD9UHFOHLQbrci7H3YlvQFtgi+BccWX9+7JLXpA4f6jxX2oFbTg\nRPnAOA6g3WuhB4vGyCyRUPIFIFwvuwR7VGPljVxKKUQ8aad97C63MZLsFkYN\ns5bpVqJwmpXYNdIsQPb+wU9e+JrjRZOOoaPy/x42keeSYLiNfE9dzBR33sYV\n9CwgxXroM+Yfu6JvTiNdxRJYDtO2iznvI2y2aY7Cpu66/0vGR8XjHkByWiCx\nsSHzWbH0epTy8BIMILsEB0oc7NQTahZnU14W6I2zZtdKd8m7mRFMOCHCF9xC\nVyJ7K5LQ5C+38zP++6PeAd37aRiniyWlW5ODWCO2cl8UbWAUDPiDNJlsbXND\n3O/e\r\n=GmtX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCe1umUIod661ZsJCdsRNrC9hehgSXTc39AqhTNptjCugIhANh1PWA0Ts8vvoLdw2GYPmGEPLMu/oD6oPVoIAoOq3tq"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180902134145_1535895837338_0.3001758295134218"},"_hasShrinkwrap":false},"1.0.0-master.20180902163040":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180902163040","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-M.1","@atomist/sdm-core":"1.0.0-master.20180831073802","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"831cd61b9857cbdea6695aee9c63e366c89ccd01","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180902163040","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-EMoi4NqZ04izDLVW1TFEdPKa9nswsm8vzW5zZWTI/2vCOSRKJvZeLBg8ZEuF/FpI5xjll+WEESb1amz5NonyoA==","shasum":"64a65a699922c79a4522ea1bda26100492fe7f97","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180902163040.tgz","fileCount":354,"unpackedSize":1260460,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjBC+CRA9TVsSAnZWagAAwBwP/0B5ptrDvhGnWbsycCmJ\nrPYBezZ9Da/mjW315IPCGBIdxigz3Kp4bnQOAPz6BfE0IM/UOs4AHFebmFTd\n1CxhF/zWN/Xw5eQnXJNOWYxt3nbtBACiPsw3n0n84MsVcAfLxVpR/Hnou0gx\ni6GFz6vyazWHJnjFHlSbrQHHrKqy5GK2M+ACy37gUJQqtOz7hQ8jjxwwcCQf\nUb1tilZJAlLm78ShGyevHSOslgxLTRJqJFOCTAgdYceUyJ9RarUhQ2YTMWZl\nfOIWYwJsg4I0lI+CK+PNLstpjHsBVLDp9T3IoGjKu2/hVDpYmYANgTZ1k3yq\ny5VGNmg71w8qwWVqsM5VHdn39iAysTJUZrAMZIdoZm9PTCP1t1C/O2i2Hxeb\nUlA8y4TPi/TjXH4+wYlhqeE1U8ucQgQd6QZhpIrugg9hYfKO5pzV7wqhK1cv\nIgrrwaYelIQTnA9Ul4/NlsHNBS4mGScTdQKub2SsKPbIfGxwJlKRPnevwe/g\ndZ5kLiiJRMrx0SiO4Jb77XwViHRqWGV4ZaiRXy8vSxwdTb3fpPmSBejO7R79\nd2mK+N06rKiOqdDphWds4X7/Jp/8UZ4aj5SyoG9UQz6CXTfpSaaHTPAsld0i\n0BVJpWtVEKzvHhQj1rNf1S6244E8lCqqIQ2th/IXuX6/8q+ZTZK4xRU4MZUj\nM33G\r\n=a4P5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAlBuJM2rYlDo/keH7sydI3Vkc/sOmS/pIzLvjc/zmcgAiAfGk5h5JdfGYo+SQ6rWjEVhWabSkSXutoWx2hsc3524A=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180902163040_1535905981451_0.5884244343492033"},"_hasShrinkwrap":false},"1.0.0-master.20180902182152":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180902182152","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-nortissej.first-push.20180831225158","@atomist/sdm-core":"1.0.0-nortissej.first-push.20180831225656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"2cb04fb5731ffd4e991de174501db82e295a1654","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180902182152","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-oWZ8p437H+z9CQ7X9KLz3WmUBKnPI3j6khbXx6zUYstPze3XSRpBwLbMBXP56E2txNDuItQsKvc9s6ueiJ0Ljg==","shasum":"6807917cd89a0eee3823cd4c0e634d2f1cb4ed73","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180902182152.tgz","fileCount":354,"unpackedSize":1260671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjCq5CRA9TVsSAnZWagAAl7MQAKHMEoQetRATvejjf34/\nth1+4C+lwUmJGPtl/xVpZEbpVa1Pkk9IIy7MAvOkqHKXuv/OnL+gGAutn0F8\nvxYCGY3I70AtETf6X0l8M4Bl2kGVbeo1O7f0OIQxkQFwiQRKl4SfGOtcfLDD\nBnUV08ddGfQNh9v3oaAoMYVrzR4bO4RE96h7RUEPkVOSeULLi1q+/l+JM21M\nWDQ04Nsd9Kvy6TjLzcKkMJvkzx0Ue6fhv99vG3XnaWyHms/P0iqAz9etwMtV\nUe1HX1QZJZ6y7Jf3Uc8o7PXqibD/oNOzkNmfrNNTlA+3/ZBsLGZ9Q+BpwxTO\nHDuVAajEIcEddhPfvwfDmp7tBrfAJHtsbbXkH/6oYEvPNcfeQnNEi/kB7FcR\nbvUopXL7pgAdV6h3f6HsczZbUgq2w2U7tvpo8cfwGjnEwMpLM5U6lu0djiL3\niOLfwLKXMQ0mvlyB+EmveVkjDkUzflaTiby+6f7UWACNEn+Wc7HJUTWorRB9\nySq8O5aVLNcuwxb0RZTujXRgXNatIrJMmTTr+6ZAChyL6ZDQDu0CFnfMQ8KZ\nWuUVfYPIQ10Hjj5zGjluGev4DARYxMtmq/6TEMSyIF7+ejngv9AZpX0dbUPM\nVv/q7hSr3sa8iUP0Ozn6NcPRgAAr4g6ZJ1uGLGVVS+0R5g3Zzm/heC/xPtg0\nEptX\r\n=61YR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoOAm2H10Wq+ZlHtBAv2hQTj56HVu4lrirT0+8EgVuIQIhALryezzqbfePwbYd/ZDzpKzfO46Q4FmGvAWdDXB36JTp"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180902182152_1535912633026_0.52789574432455"},"_hasShrinkwrap":false},"1.0.0-master.20180903010235":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180903010235","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-nortissej.first-push.20180831225158","@atomist/sdm-core":"1.0.0-nortissej.first-push.20180831225656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"c9c184ff1fe964b01c1fd929f72ba5a25264dfcc","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180903010235","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-uaA+Lw3VkOGrq9xNRhJrY5AgHRWyhH+mAW5SLe0cOR0/Oa6eFnAkAF8u4eWrscDsHx7Pnj22GB1cQOV4c1P73w==","shasum":"835db1303137d8217a1dd8e18f2303f2ce30e9de","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180903010235.tgz","fileCount":354,"unpackedSize":1262899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjIifCRA9TVsSAnZWagAAwN8QAInmKYgVivBnigddHv9j\nwQNLZtmteBlJ4XOh/ndaF1ugB4ljpqXwDOQFF9eXR32gT8lO3BW7QJ+zGn5S\nYnw6zfoO90S9Yl45Ar0xFvsdxaIREAx25Wkpd3vLUcI0NXZXOfGIQRu12E9L\nRbXzvEPdGsHbfri3+u0IvNJT+KOlu1Xekv0UWgwbSbZ83YXrmP8xK4dcy4/w\nHmcbZ1a7khEU5HBQw2WNarLjKvrz94+cYR13ey5rmeT73WyiIiSBrksTFBhN\nKDRlr4jZidKOCGbaewvt0R76+g5mwPuuQI7nY6QZribXu+QLXh4RxFJ6buj7\noBc+aHQxXboi0e1UW8CAPQ/WCUTZ44MLYr3HR7QZB3BBddHnYxx8/2wJR2Hr\nQclxQeKv86s67dp/qTOuOtUQLUeVpdmtGTIYmqRq+efmlDtUENgM6uvf+w2P\nSBA/LhYdbCZ4omQnTtE+zseSPBnkElvkF5pUKzPJC3XHAVR5Tucknc3bxsC5\ncCxVlDj2eeowHzWtgG0hFpu0rG8CKW7vhglrPmQIO+An0moYn/AAvo0Z3ZR5\nduxXdzmkqwGheU+3cnVCDyeXeVStTYrrPtu5B7XXUXbzo8pbgIpCFCteDKqE\nEJllvl58ynApLx7ILFEFAF9khfa8PVT86G976E+HazG34f6v3fgfRnfKxc1B\nVook\r\n=jxJT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtD0E9QtZfxq919FJ0edKQoCTyaC3gE98dLXFOhQ+YwAIgD7+jS7rwUKquw9b118aoeTRJeNBwe9tLFEztbz3WGQ0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180903010235_1535936670627_0.8216285788049289"},"_hasShrinkwrap":false},"1.0.0-nortissej.skip-nonlocal-machine.20180903023351":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.skip-nonlocal-machine.20180903023351","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-nortissej.first-push.20180831225158","@atomist/sdm-core":"1.0.0-nortissej.first-push.20180831225656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"fdad35341560cf54609ef869183b6e788dd5590b","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-nortissej.skip-nonlocal-machine.20180903023351","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-lBI+N3iFH+87AlskDAp/AOfa6GnB3sP3gBepd4VnVGC0CMMNZPzQnCTgMBiNpwEkV/J114XmkGJLq8gno6K0Kw==","shasum":"13dc780b7454c71b12b5246b1caab39d048eabb7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.skip-nonlocal-machine.20180903023351.tgz","fileCount":354,"unpackedSize":1262974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjJ34CRA9TVsSAnZWagAAw9AP/iKY02vE2FDunJxoS012\ner++KUQDXSBzQRytVgW1rYeMdF6FLGhymIDCWrG06Azyx8AKwFwdGGOCaZsK\nar5EhapfsP7YUIRAnPU8XukqhxD/67nSwSyHVJDa72LXzned7BF9tZ5kRIHl\nfEkY1q2YeGn4oAJtSt59zkpkrG8P+cvRq9fhFjfIrk6mBYO3KH43unUBkK/C\nf+ADDyOOv9bmpz8uPo4OZR6edMjk1lqACnj3yCp/Sy7+3CDC2R2//agxfxaD\nOqijfSyCq+eoxZhbWtrfG4iVnjYKm/BD+AufloubiPFReOi93AtlcBkJ13EB\nwRBREuW5FMIx8MeMYBdcdj/fwo/X/RH6cSFSzDzuYxe0nN7XaNz/iTFXm8Xh\n/9XqV6QLcgDXDcRjDjvoeZqtWvSreh0oE2aAfuqP82853TK63xi063Pww5ho\nM4FRElkQOAy49gDsIrMR4oOceCLuCBm3W3cnKCHLtEex5I0Y1oK/pfvBLwIY\n9tAjXFkwr55KUa786y/MPxsaPgldMaqSyIAZB4gQkxAqxrlFeFuuimSpeKPm\nyNjS8z/i406QYrxicOt+8CLeLPa51RDV2HkTVOINxHkYJxzSX5OvncT6Ol91\nJ1wDt5XsFl7sItKsjYgh5ObS/uRe8YigZLzbpd4uB1PvQBcV02v+eZ3J1Dtl\nQLdD\r\n=dCXN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPvdUtW+DIbnz+hWxTMoo5D+eviRJHq5tCty3FoY4SMwIhAJLZRGj/4gDQY5qQNeTBKtZ1t+Wu98qIw77fHgkM0pR/"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.skip-nonlocal-machine.20180903023351_1535942135741_0.0956930901740376"},"_hasShrinkwrap":false},"1.0.0-master.20180903043456":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180903043456","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180829070856","@atomist/sdm":"1.0.0-nortissej.first-push.20180831225158","@atomist/sdm-core":"1.0.0-nortissej.first-push.20180831225656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b7a2f00f089d03366fd59ab68bb3d42b1f5346a9","readme":"# sdm-local: Local Software Delivery Machine Support\n\nA **software delivery machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180903043456","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-qtBfR8vOVj+tgBKLSYYtasiDxoSB8q9iqbLQvMyzoH/mfv+a67lhcQyHt1I/BQ/Jon1Uhh2VPDm72sX33eE3Lg==","shasum":"ccd1631ec5b8a1f64848ef8cc5d83d3724739994","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180903043456.tgz","fileCount":354,"unpackedSize":1262949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjLp/CRA9TVsSAnZWagAAzTkP/i6Z2Ge0dbPah8TOaVfM\nhShktSoEs74dtLFz43fylOUO5o9xzoeIiAEp/Bh+bPh+UXVOH1OhFSDnpuhf\nVGjKLylI2HGXrJao52xk/hOqUAuo4v7tt1aIYJE8h6FnC2dKyIy1ue51/dpe\n6uVyXTYx9DGrqnplP8GBmGHMvisGV1tfFZ3xZZg3ou7K6U0MCsFwEbmreVvB\nTXWdLXM5e2ZPFkOXRy8WtHzgdXkgHaJv3LMJv5Hte7H/upG5qXm2W5nbRSRD\nPUmG4abcQ4tA+NOfiyOJxy5P45RYt/vNokRykhJ8D6XiOJ9ySHFzgvQCcXWP\no9YRgrENmHULEO4SQngZIzm6Kgbg3F7JpL1aSBgAuEuMqky0bqPKzb8R5RqF\nmOsUIRux09TaNS7c/NRiuU4arWvKEZ3QA3XUUUpYciSSwqk/Z/lxl3WmD0Jy\nDSYDZG9ObLiknBnx8nvoe4LxJA312pXsbrwMcfjFboA+ybXeV60Ukg86iQD0\neicH/XA3LVrm/C0Q1Mse/6t0G3G97rr/5KRqPOXN5kHPpgnlAUuirqe4BPAP\nG/qMQ2P0iYd8C+dMsIomAD7ISxa/Uvy2gN6+lJ/4SOe6HSgMQicSZ4KLYXRT\nHYLAKHg0IsgsylnA6CW0jNp2+DkC3nshrhQk1CdOJ9GgLVWNU6N5Zhyn6Wel\n+1WP\r\n=dEXH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbK4MapnZdMbCFSX3u9t5QbzaPw/8IPjPVd0Kisj0ZxQIhAM46pOEqoDa9IoZMvON2RWagz90ADQUheWiLDStjrRlN"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180903043456_1535949438324_0.3484544607808746"},"_hasShrinkwrap":false},"1.0.0-master.20180903192503":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180903192503","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^0.12.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180902163213","@atomist/sdm":"1.0.0-master.20180903173217","@atomist/sdm-core":"1.0.0-master.20180903173115","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"adf25354cdbbde523e39c8c318821dca6a9e7674","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180903192503","_npmVersion":"6.4.0","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5PZi/pudbbzuJkVPGtoFSn+a0HY5M2GT0XKboozIGbvwBsw73Ho7wuSuGWA3pzbkrVL7cYlbPsbB9A0N7LLdVg==","shasum":"978a0f79bd9f86db67a469964b55056e1ea22572","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180903192503.tgz","fileCount":354,"unpackedSize":1263521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjYthCRA9TVsSAnZWagAABrcP/RiZ6+Lb1uNjWgJTm+HV\nnoexKrYiiEc66cjt8WzhdVJCIwFAJ4hYPt6e6shFZjONYrUZjt/gfH/LkI7b\nGYb6PhpLm5gYTmwkEVsIWVzhxbK8QRA8b2eQBU9ui5eaLkOsKFpFr7LcBF/L\n/8rU5EA8y5B5u6QE39JYImnrd4dydNyYoFV9obAGNdl/Fq5d3ZkhLO/Vpeux\nQOXPvYvfk5AEbH67D8rJRZQGtna3/iS76hdqnsHZ4DxAiXQ/ALkLrD0pWcQ9\nOK54Ryg2XR6iWqoKgKklz1pOCFhbGBC0yyzh4cpqseaOQx3s4icJKU7SJdr8\nBEidkZ+ZAHUvWvwHaZQe+rHd/S6SUQ6X5vbmj1AuEDn0j/ZxwloVjDRwq8dO\nsoUKAck6P93Eu4voQslsjeBQsktky6Z9+gJisVqUbBeOnVe9rY4XiuaJJ4eo\niPQqXa5tvTitHnBpFFiYX9xYM+0Zk5OPHC8U6g8XP3vLldKw+c3DiBRdcu/P\nRKXgFjETLUDmRGDi/LXv5Bfik7BJh8dbkgn8iKYmvgVJNFMr3r+7H/T7KJYE\n9wPzA6bdou2hOrVUis4dCIftzAqay8vmYVasR0Lyy5d8kh02zKVjycrADUYb\nVIxolA8GaQiDArI720PaPzBXUIu1gZ9SJoi69btw7JVBCnCwl1iAH5xAwvq0\n4hhv\r\n=352f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFD8gKclJjnRRgx5ennbTUblZ4qyAign1Ljl7t71W6OAIhAMxmhCOmUl6mlGukI7JlacewajYnjj1/eDFPQ60PsTF1"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180903192503_1536002912634_0.07262559878132491"},"_hasShrinkwrap":false},"1.0.0-master.20180904074511":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180904074511","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180903210158","@atomist/sdm":"1.0.0-master.20180904005606","@atomist/sdm-core":"1.0.0-master.20180904003112","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"3e7f0373ea3a1ed5ae454981ea4f888cef7ba783","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180904074511","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dQmEdfceFoLMEtpyI79ftO+4/tvKRDvTxRnyrtUWgan4UAGAmegkehVDLhT39AbhpLxwOajQQS6acMAQHR8OBw==","shasum":"d1b7c429150436070eadaa91c891b51f383ee994","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180904074511.tgz","fileCount":354,"unpackedSize":1266898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjjq3CRA9TVsSAnZWagAA1dEP/RcudqDSPU/MkicToOi8\nkCWpVoGojX0mrjALyU6WlqhZhqnjn0jVr0cM7eE7X9hbU2hr+Rn6Hlxnrm6O\n2lNKEKeeZFkqsyiFhDCLdKPqV5FcGgKG3TKrXvkd5uO89IKN6mZvUeIsa/Gh\nn3kCIyteZspyQfK40iCvOdkI/zGxetg/BDBdI4C6oO+9S8HnFHcuBCrhOCdn\noB+co0mk5bu0aS899AtfU7DrZ2Fji0lkH1hG4cvwDszh9a8r/s6BKUw6R6kB\nQJ1AkXeQfkDMQ25KVHNBsSSKgixrST5LzhAolyqZ0HDoGRv4gNn0uJ+kJQ/X\nqDwNwigPg72Vz9RK+wRJKdHf6uPqDnK4djtOS8ZMf3GBf3Y+HBe84064jeFS\nTI7qEAYzLDn7CPKncJqt8BpDTzZQ2YV0PykWIsArtYekTRX32zxXj3kKQZIk\nCdcEQAh+SRg02NAJ1gvJsyppR42xgFuDTniZSJSnJk50T+iNZsQ3Q6ilYYvx\nWl9ZIW+iKUqqUBr8GJbDR3/3l+k5C4xewJDXcO3uwrfCVEeTq/4DF5DEx7Ch\nC43xd6d5uQrQjpiOuVxirejmZ89L6QHSQsy4HdVxrw9NHX0TOczorTGQg5we\nDyA/6HYPaFs/EOVCyNVb1jFIHszSajcq+/yfdKg2db3Vsz44nQnW7vQpoiUM\n8tdJ\r\n=5X9g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCULCHvEeA/O5mP6ofMdaBY1W7Dc4V8U0YrNx/Ttra+KgIhANqEaEyyCziGtpZVo8+xCrSkVMLJ4d4padoh3AlddtV5"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180904074511_1536047798986_0.34161125944581916"},"_hasShrinkwrap":false},"1.0.0-master.20180904104648":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180904104648","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180903210158","@atomist/sdm":"1.0.0-master.20180904005606","@atomist/sdm-core":"1.0.0-master.20180904003112","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"fcf6880fb23b38144342ae8da4a4817c55b1f45d","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180904104648","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8FUFt0S+NVXmcTWIXxjdN41YbSZKwP/mGoEJsX9KiJP7g7x6vhopgjUhjMlb77hD0GE7FgcBWBF1hXKn95/J1A==","shasum":"c9b5db9f81f40aba589c1fac40afd1c1d632fc95","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180904104648.tgz","fileCount":354,"unpackedSize":1265567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjmMZCRA9TVsSAnZWagAAhmAQAKUU/oRYgdDhX17jUWUn\nDUPhiEfqgcaTpuKRbmAlWIynNvC0uEMYaRsBmo6eCkPObJs1go8C0tx8bFaE\nRdKZyRJovYVi8Ti3rc5zUts67HCuPTqlDCF5jkHnTaSObjhlUJaUCd7jR5VK\nlEi/EKvzIZUCUYxlAWPrny06LqHb0HkSBbqUV1KO5HXMd2YlmNO95GhFxFHF\nutvNKKzbHs2SqcQ5OUsxBXuCG51V6DmQKisO0rsXuHBzg8vKuAhlQKbcX1IR\nY9S55aqtETpxuL3RMx3NeD5k2mkC8zJS+GkWA83oH2fxv9jUi4IPssZfnfjx\nsZdM2VB5ATfT/9Goia05ZtD4QsWnvoI3N0wyUzAsry4Df881LpsNaxBVtueY\nENDCZf1ZBUYTfsoO9HxQHwxMMhPDkQQJz4Go3jhWi/o4M9Do99cua7hQEuy/\nf6t20BA7E4i2Mh4LFZ/qxH4WNbY6tBFi0T7dTBiVdNjffzLOvHu/z/Guy1kZ\nczmHXCLrCdDagMDk2oMdWKRq8ysK/3/ysnMk6rLB0apYkGorv4uyvI1ljjYp\nA87X8mh9VzrzQ32dBI9uNKMlnlRoMvELQ6iQOds9/cPQA2uhI1IaQgArsCJF\nzmkbu1IF/TVIXCzi5p78tJbiRKqrj79dgKxkEF/m5L6bvzylvfjMozAVxquE\nHKWJ\r\n=4e4r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIECCL/90jw8HsBesc6x0L6xc8XTgGbh1dFR5nqvPo7YlAiAH5RsZQqDsHhYU/9xz+alpAFjMG+1TYKpW+yC564RAUQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180904104648_1536058136999_0.7327325612587374"},"_hasShrinkwrap":false},"1.0.0-nortissej.reset-goals-command.20180904173242":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.reset-goals-command.20180904173242","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180903210158","@atomist/sdm":"1.0.0-master.20180904005606","@atomist/sdm-core":"1.0.0-master.20180904003112","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"401e1c4211634dc61b2c4c5ff665112e5427529f","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-nortissej.reset-goals-command.20180904173242","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-IS0tg3wbgfddRW3RKTmqSufCprFmsU+v1TqLQBFctpqdhZxR/lU6ATR7cjrFEC/grgHPlTjdSkijEEwl1Pna/g==","shasum":"864c9b987f3bd5922c1b97a38b4ff5ca4e342cc8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.reset-goals-command.20180904173242.tgz","fileCount":354,"unpackedSize":1266248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjsKMCRA9TVsSAnZWagAAjhkQAI0Vr45EtJaMWhvTi9wF\ncNdRKMziArB9x7Fjpb32csEHpbGV39qtH2axOYTPt3uMJ5OMAeC/YnODFlPi\nk0a1+g5YMOLEhHd88QfCFZoz97w7VmTMt7GAVSen4w0SBV5/FJUbucB46c4N\njT/aA9drXGMTyX9+KWI+60WARr0CI3rpD99lbgNi19Ta2aPmun74nlrd6qKQ\nR/hjwBEi485Pn4hkzslh+Hh1X+j8k3IkH5bTT7QXEtf3MDy+g2aROItb+f6K\nrcsoo3KE5zwTVbSgoDFjfTda9Pt1jU9fRgasdlize6jrcYnefwrfmuw+GI+Y\nU0RIctQ9/Mw5uxMTO6loTdp52vgLSpNZTN+2dPNKH1IK5CLt5x2hZVZHfeyK\nPv8e1LH2lvKAFEW1QsAp8kQTQN+4W1Urcj633/eG/Lu69EIaNLvSgjjj3MUY\nda3ZuudGQfv3bw9ybmKp2PJtyBu8xoMUM/nnWnc4AKVhDhTO6q2WlWIM4wd1\n0AZx4I382mLddkbyC5CKNyTPdZoEYfM9+R1vdpzmKo7Wl/jKtfbiNFWNVuLr\naZltQkVoRRSTwJFyjRHKvqjBmk8kMGk5GGpHFbGwWNbbHsgcF7uHAWt7ckN9\nsQ0xoZdImV98R23QUZyzn2x2MUR5rKf5mxe3UHIWU9ScO0e/H5gCTcy5ltH3\nZeQt\r\n=hA6t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGDcF0V52GplU9bPRQef4cWEtcg3eTmiNGVw8bkqevqFAiEA1RON9Qugb/xcGj//Os2Lt03RwQqcS9sBK18NBxylOr8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.reset-goals-command.20180904173242_1536082571315_0.19996482529013537"},"_hasShrinkwrap":false},"1.0.0-atomist-update-1.0.0-M.3-1536084352170.20180904180600":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-1.0.0-M.3-1536084352170.20180904180600","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"6d794891b3c21df1f3a0b33ec4c95ddb123735b7","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-atomist-update-1.0.0-M.3-1536084352170.20180904180600","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-aPQjustacK3b8KKyDY6uTB3d8eQ5M0zCEjPfma1lZOr0s2XK3W3S1j5oH0wx/4iz7ovGQqbecxlfqG53TZe4ww==","shasum":"d3efe00701b37668416b46ab413c14ec24e3cf1f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-1.0.0-M.3-1536084352170.20180904180600.tgz","fileCount":354,"unpackedSize":1265545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjsogCRA9TVsSAnZWagAATloQAJCOINTJuzQdmua2R8Yl\nbRl2JAE6zCmAzIrNT1KM17xiF3c4LEG+GoIf3kbUo3A2Jz7IKSP35GC72A26\nNbVdSgzvLe+C47be/DxMb/Xdj1/8scTC2Rws9y7rSqURvjt4B0mDN/WCqw3G\nk8Pq5XW4IGxUmRA61eR+2qA9lvUXlt2E9OpRUh58/XBXbdFxiv5xOoHL98lD\nJS3s4zpMrWzC/jKjwRwdw4oC9GkwMNbMjeWjoiZQrwLzHmPKWCBXYW1K6HDW\nhtuSHpqHbHUU87COLVfL6iFnf1D6KQG/Nu27sxeDZg1x8JXEUGa4u6/kqV52\nCCIquEPr/num0aRAXmTZUlDbD5VPOpNxw3uomMEk2LLXnVttSEMgiYVdgTq9\nEZocGu1WGEiGJcsE6bdUCgHxX8ispp/663JK1XEd4k8BemANpnRFGPKrvt+H\njNJUvyo8ih+Ff40YuOBzxG+up6+2RYPJi9xEsG3iHuM/BnwXB5R79fWDq1xi\ncgjg0Ttjh0aqhjoWya2ZuPWNAQtPi7wNUnr3+tXmNS5mXJX7Fll7k2lJ2VFT\nMZTzlnWVn2vfaiI+3zDO3YuxC5XTXGhjHz6THLeLBcT/TLRO6oHLnXM0x8v/\n17PMZKQUvbEnCiogY6e8XrefsU1ourkG7m5i2fqZQ44xpKv6vwUKHrpjgo2e\nO49L\r\n=7zcw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB8yUDjRc4WB8c/4DbeTJ+x8fkBD9TscSftO1B4s2LfOAiA6tcYNYeBisd4xulI+o+DnTRWtoFY/ZGZSM0B1GJyZtw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-1.0.0-M.3-1536084352170.20180904180600_1536084511828_0.6377438290710111"},"_hasShrinkwrap":false},"1.0.0-master.20180904180944":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180904180944","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"20c9ca0abe2665dc608a6fbc481c832eec3aa64d","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180904180944","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-eXu72spJMIuIONA4vt6BWVdVwFNHxG+KUIJmePE8QPr8xXfawTXQm5YiijOlcCCJUgQgjXsCIf21XHP3Ker7Sg==","shasum":"0302a85605a21c851bedc7aae0889c766427262a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180904180944.tgz","fileCount":354,"unpackedSize":1265459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjsrpCRA9TVsSAnZWagAA56UP/1KeT1XrZXL7lwBXhPso\nWFnpKO8PC/T+515szB5Ggpf7z+DWZoxi2NdMkE5e2MNvsl/dZWhncTUv5abh\ngcNN/D9Jvmg7GaC+r6bPnorol+qEMkdhUHNq3uE1r3xJ2ZRqPzkR7vIep9+y\nlZ3do9jxjCHkZCkFJmVyu+HUuwlF6JtC/m3dg0Zmb3c6fmzKaV8CTQouWK62\nud25nj7Yrbq9Lb0D2jcSmzn1QWMZQTXRf5CBKxbXkfrwYngUu2ogeEVR8uzh\n2BNpw1RJYks1ohtZXVRC6Jk+Uy8AASKRFXBe2XZa1DvdVSNRom3tVeBwvmk7\nN1Fzw0F3P7U8qIECRKZWhj/+dRtLGl/rOxXGyxebWjEKhqGB6iLDvGEKAgP6\ndIAzXI/63n8QcBdmlEtCkMKhKfnNrMGmcT9FEK5skQP2eGmBrP+xrb+Z8a2O\n94Z6zTbnd8igUMuRuguBVvBlGRorjtYweVLWPjb3qh0ibwSAaJyopjtNX8OY\nlNkFEOXlnQ+It9Ns/EBNC2s1L+6dr70J5ePQ2++rqm0gPw88oL6PYF66Xc4B\nVihNgVSfVDTIL6WOOBOvgHQ1cClfHXtAP4Kaqh+hsnIyF9SLdzqM1BX8do9r\nyi/kFblFUoR2stnzvsaVHLg9XSZsRNYZDWRYk/YVPJzoLHG5VfyeTvPzAmZU\nUwaL\r\n=Wk1W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLHe/mdeQLosgk0DeB5ozlIqTlkcEjZ0zbs9yPzqNMGAIhAMSSjjNDwOV/Mc0jTdUCFxOU1k6Vz85GxFMBbyy+5wB3"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180904180944_1536084712334_0.8652405407377586"},"_hasShrinkwrap":false},"1.0.0-M.3":{"name":"@atomist/sdm-local","version":"1.0.0-M.3","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"20c9ca0abe2665dc608a6fbc481c832eec3aa64d","_id":"@atomist/sdm-local@1.0.0-M.3","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-XbXd5P7PrT03xJYvtDgbpB0bJsmou5zu94wAvhxs624kUUVaZP7em1tOZ29iiH6mNlQfW/64JYCPuPdq8zhfOA==","shasum":"a8af6da1e76ae73229b8f69079fbbc329a87cd3b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-M.3.tgz","fileCount":354,"unpackedSize":1265441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjsvLCRA9TVsSAnZWagAAP5MP/2udeffw/duUOp5S5AbA\n2xnnKeQ8RcWjtjsIjehrNB6HJmox7XpiPkOAkL4+C+bkaC7YILSSYgv81/J+\n9zSJGIURPE8SliKFr2N+yh2Vnu5XAdNaLQd1T66HTt1lkig6dquhNoPDJuK7\nfFwZc4QnuFAYV7q7SHXWSKpi36SVuJWSfYvxmwbc+unlgV//E+k+VV8tYio7\n5XG09qfJHCgI5TolYbroU6foxgxjNcTQYjm6aksSNuhZjF/lYlYV/9Oe9VlQ\n2YYiYvsnbKPE7bKpwCvda6DOiOip2nmW/bNb1t70g/M9g5u2jTSoCaFvwtdm\nUCIpP7kO3/8YZAr/NO7HDZgJiHXROUQaCDT9eR7sdxHD2s5xrj/8JBb36R7S\n22KyTPsbe4Mun5CVzpnmNL+e38TXbqUDwOwfz8Z3YcXMEAHleNo1BfWPgR0+\nQlt32v8s2GgtjM8P3ZumcFzfkwzeWR8AXy9DVSPv0pFq34ZiNEqrInSegev4\nA9nsQegI7M4ZId38UOoIbzw+vnZm4VJxMiZ5OYbaIPOxPXLUN066qu7stZQk\nqgXpZKxVPIprjwaem6TWfEMOPp4NMSQsLCLE03BxB/ovsSp2qIoABwNtXaF6\niJKpHFomm3MCJZa6+tyS7QSL87QFpPOPkvVxhQe05N1UT391vXGWbvUMyohZ\nsMOo\r\n=ACw8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGmqC5nqqLAEdNGsh44ViPyvxDMVR29IyaUQaakv99wbAiEArI2e0zMuiCTVxBlCUKlUXXMZsvxBM+KTiuMrRKTzzBA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-M.3_1536084938710_0.2793615131006766"},"_hasShrinkwrap":false},"1.0.0-master.20180905234344":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180905234344","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"c3083fac95b20f5b7fd4f54426690c2ea3226a8e","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180905234344","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6fQegVA5sNvZIQ6O4KWmcenBct9l14SzButqvYN7KH3+alQ7PvNi9kZvNpOaxwCfb8qGzREDy6UiAMSWXBTkHA==","shasum":"8c153ee5d8cd13cca9ea0454cb595efdc868655d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180905234344.tgz","fileCount":354,"unpackedSize":1265400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkGrkCRA9TVsSAnZWagAAFVsP/jvaxuggmXmwYW3M6d9x\nlCS6FiCshIkZzi4Szb7GYUy6try0ud/ClnGQHdFnl96PRoXpRy+cu20LPf/b\nejgCdkDxPOhhCfpDJJH8ANGwOafeCp0t0ywAZtxNXk3FtvzD01maBcz8OqMq\ncD1nsrmoaUhoflBOx5yk+HPsMLY4bDfmAaa6c0iH95vHLbcTHiUKBEHoca/1\nD5ogLbuf6uNUv9egt447taDCKyg95OY+5tdiIyYifZ9q4BrP5pbJzHaWXpMo\nGWo/AlH4/DxvgXWwEaa4QgcXCKYECyGLGq11xQGmH+gMkvY8+I8f0l+L/XYr\nvAFWHAbqRGjP+QnwdnMIo6inyCdJAFFsDuMGSpvshEgdnCKTwjwZ4lwar/KY\nkM0Z7l/t0MFQDeqP3B4U4glOqUZGw1TCIKFJiEcKEw0Tbg7jVgsowng/jPSL\nv1CP6eCgu787q/2MYOFaIf1vX+ciA2snoje1O0cnr8H8xV93NYn36BcrI4Zf\nOex9AXJizI0KsUeZPrSJQ0lw04B3yh/bjrQ6vsd6yL5lpylY0GTwsG00RwaE\n3pDDY6AJFw+f6MP6wW8Cy0UXa6XoReS/hda8fJQ59XxrEuqbRQtQulIaxp48\nKVp5pFhs19Dx6DoKipTH3HQwVNWcS33F8CpzElOuKRNN6VjI/WSxpafCTNp9\nzmuk\r\n=y2Tg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+9hIXL3MtsST/s0gEVlraUTQOpt06fAMmyXyRyHnTDAIhAM2CpUZzxVzWjs9kRCUeLoRtD8ooHoOaQBa1HEGzkEmp"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180905234344_1536191203952_0.5104111062394876"},"_hasShrinkwrap":false},"1.0.0-master.20180906162821":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180906162821","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"5c8e99d6fd19cd2e2cef1898ab11d48da54911c8","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180906162821","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-M8Z6JRoAjukmy4U/8ibqi2pOnrOgTSvykRVUOBJzMpXm6bgvo1754R4H9+UsgnARjHH7WoCx1WIu/r7vyk29+w==","shasum":"7aaeb498986fee4b8e4c2e0e3fa3145557376b61","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180906162821.tgz","fileCount":354,"unpackedSize":1265482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkVZRCRA9TVsSAnZWagAAxpkP/RalDNirT5iOOFedZ0O6\npj83XKQ1D8zyI9oPLGuOA/xcmHIsSPvwBGfWnlQ1Mb/bdgV79fCpjYGEz+tl\n30YW+STVNzKmHP1PasUqISZaHh66qZraZbVDnc3ijVW9pRvEqz7fKlEqqJia\nVZczv4u8LQelC1hZucwEXFGsDDECVQvN2cOMKqHJsGysI/BkzEl2cbr+7V2H\nKVjg/geDXqsbL62rCvEpyXRsBmif/Mff230JisKUQxJIO35p99TQWA+Bz9zc\n9IQzViJCXVgTqAAfoVPw0cYAVWzoFG51yz6YgOitp3Eh98TTpxEQV7z6yHa0\n2uLd/m2ttTngA7ErL0MpT9L7pFidy2N/nYgjvBlxrGKVVWxVjLVkK+j7J6q8\nzHWead6LT/PYfMvXOfwgpqO/AmpYEqSfaXJ/zBtgzLQ/7gKyjgNZXU3slwu8\naswhLzcLstn8VQyOPZGKDfF2zE0z9zJ+LQqtir5XA/6R19DMBQFxqAnvG5Xm\ngKF0/fEnuNVr6PotKe4V9aBz+Y2OHDsA915ZCe7v2xpkspcCpLyYU/lwr3ef\nqoUguMNs/+KRWOV6VA+1cBMN+E8STtAQHf+c6PUpiMZTqtL7FEPxvUwYBYO9\n58yNeWPvsPXBpbC5GC0blii3rM0u+PUbqSAzQw4VdwtiD8ASQp9AqbSYbfpt\n/UQU\r\n=cAr5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHQARTfqDGkp0xF2IaYTLkQgRFBmZ4uQ3c1B4NTkp/AwIhAI9gRdgdY3vMq8HaxbpB8HpjU7cacD6IlVc09uQgyygx"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180906162821_1536251464921_0.2713000682093223"},"_hasShrinkwrap":false},"1.0.0-master.20180906164627":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180906164627","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"3864b16d767ad9927e636d26e5cef54ba6ec5319","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180906164627","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-fN7G4WzDxJbs1XBkL/yRaEBSXRFGoPsJV2Ho+AJmWBZMTwhHYgmYcA6QlNEhcUvqHMHs9wGAgqVVETzvebeQ1Q==","shasum":"e280f08009bfc35295359776eb89e0bb28290e41","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180906164627.tgz","fileCount":354,"unpackedSize":1265400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkVqKCRA9TVsSAnZWagAAINcQAKQ46T02tUghB9m4oWWq\nZCnszxAwgxQamyWyLHxjhhvjqCm22R0mk738qxavT7A5GZ+DMTkek7rpEHgF\nGxbTJl+64YedMDteC2hqLPNqogH9riNv5SDSan3XmoeQbX/c+rNwW4NQnrNH\nhF2u4dEuKAFVpOL7lOySG7pthtoylDGLm592I9TNBNNiAwClcFZDFPjA8Lsw\nN/1zzZdvRRnRgtfKk9sqyh9X1TrFFAJrP9vqufieicJOdiqrYYIDstUgF01c\nO2gsOO3RBIeUY7O9kN0g4zyFQ1vqQuhZyqoArzpM1SIofV7yVl03zaR8HN/p\nSIvvZZbWgD1khEcKPOAlf+LL5kNJysBLIhZmn2XmegsKtdJOJcaHCOQRBKkL\nHGtvVj6sDLKiuyZ/PmawBP61LmZXV1FvgSw+hGyGShUKADMcGYddHj21uGup\nq7958ne6fDAcII2d6BFnse+eVMFRkR3cFDXLC8U5neTGlUPcsISeouu6o2oj\n4kP+PAHAk4uuU+7F9Jff/NPCwMAZilDKOauqBmrj78yG+zk7cvu0V0Q8Yteg\nlN3cwuV1XT5Jtg8xC10U2jDZULOrVXwnyPi2+LLgMtW0jkDaIkkAlhel0I6e\nBOhJD1gWl+1nV8vlbIrzV61hjASs//FxmkGTKqYlmX0cNmCAitFukmF0EUGl\naHUD\r\n=XsL/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEp3o22earDa1GObBmLXpxiUe4jGmOwdsSto87nMPx73AiAt+moqxC50s6a1zXUKvZC3lbIuSlgdtAwxvrMRz/CQUg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180906164627_1536252553220_0.9027871839759605"},"_hasShrinkwrap":false},"1.0.0-nortissej.less-complaining.20180906180444":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.less-complaining.20180906180444","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"500fc8ae286311d57011f56995a9b6fdea288538","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-nortissej.less-complaining.20180906180444","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-wkN/fy/Yh0Ry6rhbY20KZ0obI3G4fABGLcLZqffeKj9oHa1cc54C57Fpypy2a7zd2T8ZcT9sPCV9wgIQ187jMA==","shasum":"dcbc1182171efb7df0a25445b6983835b8a1d971","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.less-complaining.20180906180444.tgz","fileCount":354,"unpackedSize":1265421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkWzXCRA9TVsSAnZWagAA9ugP/3OMjkZhF/dzaIPjZMwA\nNqat3oczDqfiOlyNM22wwWeq2tn75R2cuHt9eZ05G3HGJLPDbGL16I+HWJjY\ncyFIJoUUsnA7IgS2hYWu9r1tSi5J8+pHTmpHfkA7DC0qL4Ba8H9TwHXKEtc4\ngvGci2r/Nki3apBJsRW+TV5BcFlTDqVHzyDT7Y5qR1bNjjEPuOEx6/jCT9TQ\nzeLJIWuF6nptBjLf0lk1CDifj73WDZc+u9hM106pZn9HGSwmQTZh50V2MU60\n41aOsY4hgjOwCXG9iExsvwUeJA7bJVAwvWMRrXWD4uQvJkfJN4mleMiKtHGs\nAdItvaWX3KDPc1jBt4sbKwv7iGwOc+hfciNUXvpQi1J/B7l6UGpNcov+IDXM\nK4DP0HRYB2FCeWUKurSY2w46ndHIBmDkmBIX9++zV75xhQZsyexyZcF90h6s\nN0zzMZ/QqVHJGPgH9v6fWEJbZSoyfTE1vdjedXNXSiYxNLyePKepUdVzWU5o\nPVODrGHBhfxoBxm0wjVR3jMBW6WAFC5Qklo++Vn8le5L1DpJydAqbymZMPtE\nlPdKCwNEEuSRc8H/YxYonPi0P5kUrVaC+7nDjeA/8Atxr5TTBqF9/7BNfuko\n/ZxBkXOqVGAErq3ebDfl7f/cvIDOkPWzqVuFAfXgjnhz63s82dbMd5K9AhDu\neFId\r\n=c2zi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwwO7PfQfut7TGSxxxWYAvmbPdhwO/xpPbJFx013HW4AiEA7ozuWkdw6CL4Fr+MYZ/bESD1Zyvmt0p5LlD5SRkRaW4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.less-complaining.20180906180444_1536257238835_0.6625326180612163"},"_hasShrinkwrap":false},"1.0.0-master.20180906180904":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180906180904","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"60cb659c6fb538d255a3babba3909997e2b3aaad","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180906180904","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-TjRe+3qbfWJb9ZFuqSRpKC+iq/6ppXst4fRSFT6bWeTYpKFB9R8LZjFXvnPDR31Ijt4pEY5qpcp1uYbViYDHOA==","shasum":"2f29bd784afba6506742bdaedd51b9a2cdf61f43","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180906180904.tgz","fileCount":354,"unpackedSize":1265401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkW3rCRA9TVsSAnZWagAAN74P/1Ixplghlud3qJ9X1Ula\nnT4WmpqrlCpN/T8JC2KnXMFKMmWJYtrfJicEEaWw0flRqjLaq4CXkcm1a8Nf\nXye4h86o/jndDymwTgbZN5Fz8PBWXhi7zRlCRWq0T/YFB8FitsUbuLU3Q29t\nkyGRyF5VTSO7cOy/EWGq/5vYWlyBYHuv6LXVKTFHTnv3Bzj+BCk4tPuCqTba\n3k+rGm9AhPygoXp9/kM/CSfdyPPq66OFKXdKhonNSgZf2F03GyeML9PXlGt+\nRKX1H0JjJEgG9sIH+W+XnioxzVLxfAnMAr9JDxbKxIY37Cb12DI6ds9poVHd\nLmVkf7zxGrLUilDIr55zybsw+1OaEOGtJezJGB6Fr8YHq+6d2zVe6HAU+53q\n1EJ1i338cu44AqYu/arKkAXo2Ix2V48i5ZK64+wn737OUqZzTyfibs2ZoTMD\nb9taa4fdc7v6C6wTtcLbR4ojUibegmG0LnHWJU7ypCwPkX3r+fAMY9Logu5H\n+O/gasH8+Qa6vXuxX+nH+X/Cmxx0LwSPscsPvJWilevd5ItPyweiIVKmOz8R\nhUj9cXi+s1/wMKPLqhjVv1iofbxq5i/cZ3psAHwlfxMiquQuJhliMHcmZMka\nVNdxHbBMJORymHFvghnfgBbGLOA1JsOyuHy4XZoIS1I1AtxXeyeURiHH5OSg\nmzWM\r\n=fKQh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHcWNZ/MfCnw/MhZVofiRyb7JuF35xwOxxRdkX+qp1f4AiBJWp+9yDKZNqY+gTV4dTE/JWRBP2roWeqJ/hEyHGFsgQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180906180904_1536257515151_0.18331823893762422"},"_hasShrinkwrap":false},"1.0.0-nortissej.less-logging.20180906181855":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.less-logging.20180906181855","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"b55a94839c182ddba3ea19d44d4a8a45ed688684","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-nortissej.less-logging.20180906181855","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-LnXYzAaGYtNFLxQLedsNUJ3UuztDw7ofScnu/KSmo5oDs/Oi/T+xTLm0oUCL4V/NWQc4SuedM5HvCZwNFRbHiw==","shasum":"de503295a50f1906d9deaf9a99744db0050496f9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.less-logging.20180906181855.tgz","fileCount":354,"unpackedSize":1265568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkXAQCRA9TVsSAnZWagAAmYMP/0DYCrz5DLaKK9hD6M7n\n9x5lgu4p5x+zXjV/t+wbTP+vEuREGnr4ww1Y2VP5K1Pvwo/qRm6s5CcAhL2i\nbW2DtjASKuup7di8dleZD6qa+DprLVGDqf2e0YC1YSlqudH5VTGWfAktfGgt\nrOn1zR1lqS9lLKyBEWUVwjNxt5/IhRzUT/CxgQKQcENOrhrAgb+0b8qAxcIm\naqo2YBthWFxllT+Vpk1JpBq3CAYvAOeoCNIkEFSdlE1cFNSscEof5/wl/FC+\nKktscbb4CdJw0o8iXnrlBdCQO880Q5tRAbPtjfCgTPgMC+TrS1JS8ZeCqT3f\n8qV+UgiR54JtIZlNZ3dl9t2CsgUvEDdBbYl6rt0tMVgEoSJU3KDsm3nfGEzl\nCMIlQ4CbkiywcQtsfKFX6RZIyfnwFIY39KCZFv7/nclrIhT61DY1IPphM2PG\nzM1KnKMNkipaKlPu6kLHe5ygeI0fSyiOWoAxB+/vzSEg8LkqxV6Ubdoj7Cgi\nNqOPAd9VUIcu3V+gytEL+jdhwPjXVFuL+hgxrQ6SZ7w9W7ecK283h1UvIkjW\n0tdpNX2JLXKAvXMjXUKgLACSGAHPUNk/2YhlqMeBgF55DyaFcifJ5ylY7zLW\nYsBIbPTCZXmmUzwxzF09xXpBNpUojpxcRA6kaQiGYruO30hhClyVZN+uPApv\nZzfn\r\n=ZdCi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDy7+T3x/Oxh9RnPCNTtYeb2hqLkhRF68oJnFLDaJjClAiBeYcI444+5eF+av4ztzXSUcfBJhO/LVBbd+gjZBeZxVg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.less-logging.20180906181855_1536258063683_0.078559144240409"},"_hasShrinkwrap":false},"1.0.0-master.20180906182755":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180906182755","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"fe3a22e1f0572e11540fbd5e92f9341daa1d7c85","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180906182755","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-EgYRygB5UA8RqcA3hoYU9if0ly4NCprQRrC+9xJ3LZi7jauGDNITvkXg+SWcm8wAQmPhZzzZxddRafZV9i3fbg==","shasum":"6f755b6b48724237872d8d508a5e02703908c116","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180906182755.tgz","fileCount":354,"unpackedSize":1265400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkXJJCRA9TVsSAnZWagAAy/cP/075PyHt5ebe9Y1xKSu/\n57FRKyj+YyPPSWGoh2FA1j4tizWZfrrRCJR0FHKflhi8OIcgCXUQ/zR2hc2d\nhPL28PPDvbL42m6wICwfGmn8N1HzzT8r7DM4dlT08h0SHMqc8vwzVN0+/jwE\no9gTMA4YJMDAoqgTCPUEiB4HqUST1v2FKwNR+hll70xMJcMlwR7DEpL2Cx2f\nhiRGE4xCAO/aIjUK5eliNscWc5hUxJ14lrkPS8rxjXSESELKqGH2JcXfFgj5\nqV5HTV33TgFhvWbH4GV8qjHmZRMOhYzKkM8XpOKaVBdxDlc3pRu6BVyghvML\nwZpyQxrhfcNmG+Y163QY7f/77nPTR1YsLwU2kRxFXqL8ZxgPO0jvEblnQ8+l\n1cxd9CytI46vT/4Z6p8IMndqepL3oRXm0DZuqtH+c1ZPmtEos7mAs6lzXmFG\nhpta88hWgVhifUTkwqx6mmqC3EcKPg2QOxZFmNXfDnPxfrFoAwzxG7bWSEWC\n64QpRXXbSqDhx1/rMNYXfMm/29nkaVMhI8JSBF26K+XU9xeIUr7VdecXeTSs\n/Aey+BN/CbgvqSC2N4gTdhJwtLRPmBuLk4Pqi5QHkJL+mZ8ODTYVBUzMqTkY\nYaF9UfoIymAUOkzo9gq6DKEz4ukry6TnVeYe3DiulIQspKBUD17AABfRzE1Z\ninS/\r\n=WL8m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEd18me7TIXgVSPbtOBC5zDnYQ4/9GpiDiEaM6dsVKgMAiA+5KrzJesAmRQ75mw4qwRgI6CQwbwUM+Ry5FOAN9xvUw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180906182755_1536258632544_0.41105369800634173"},"_hasShrinkwrap":false},"1.0.0-master.20180906211350":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180906211350","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"01470454c491da529449f8be76bc732319649887","_id":"@atomist/sdm-local@1.0.0-master.20180906211350","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8Ubmvjkr4PS7Mqj6jEY0MDMJY3dVo946Qr2eH41tsv/aO+kOE5oEG4xLFi6DuhRpJPcGOG6Oxr9yV1e8EBgXjQ==","shasum":"9ca4ae4174aa6005200b2dee529b8290d86be94c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180906211350.tgz","fileCount":354,"unpackedSize":1265667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkZkfCRA9TVsSAnZWagAAM8UP/1bPeUb2gjaDFOvA4vm/\n5FSzTN4iqnDMOMyG0ucEaGkS/pNtARm17pnUzYgEMJw8PmsiUdfxMNMxqx7z\nMtlGcqFbbjPKUy+/roT5jB41XJqknwn2QU3TlyhN8P4zkhguWDKEAp/01CLw\nt/KevsypHpiMfu61RjMpQKGoO5gM9T8RDRHMd8Wn0jTrGjxVZBM0STtoA7wM\ntYyCyqVFFEMzHOGLcmtNjB2jveY7mlXFWjTjmP/0vpNvp/BqNVvzKjLmwWMy\nVPiRhojh7/1YjRXaqOn2o7lc1/MedS391iaCH9HYD+/V304BXO7fs2Slb4NL\nyf0U/m25kjA7o5iLe5SrrhLoywOz07s6QyIzxNb8KgrDxWc4eocFWVdV+MN+\ntb1WRECjtBfqwhTPSiYF4UjIsBXuUhe9hBCtwFdCqP0tj0laBkObve6Tifk5\nUrX/2W41mbT2yTlxLN6Njf3ezOp1CSS3bgVFCdEX75ki3XyMwZE+ff7377EF\nUmXQqc6ohGDMF6+3OJqQSGl4ZJhfbpWoeax+dY3kKRuCJF1mHzVrRewEAagd\niOiebi3RMrdrbh9pZbtxuR1/ff7qZ7/NtQOLAXgaOSL6dAIrvupOS3OXQfa8\n3pCQMxI1AA2vUmS/imyzCZ+sFlA3kAaMeX8P8uwgGCRtaDFIE0WfCKI+ud72\n46U6\r\n=H/n2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA1hgWLz7b2/g/kjbTDZg/VBmeppbY+r5EQBDZWNN6r4AiEA/IaWl2baxscptj75crVpazi2bAD2DHsdMUZgj7RTCmI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180906211350_1536268574871_0.13418935662461862"},"_hasShrinkwrap":false},"1.0.0-nortissej.dont-barf-on-no-goals.20180906224521":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.dont-barf-on-no-goals.20180906224521","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"9b01739615128772b8331b38db205b626e038321","_id":"@atomist/sdm-local@1.0.0-nortissej.dont-barf-on-no-goals.20180906224521","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-E0su+eAVDqz1+SWXCACFWhG3QvV9TIjqo8D/yD1Y18dVQdKDEAkZsnxqH7uuOvQvfDCchK52xuhYTmqcnO4EKQ==","shasum":"48a8cab7081681ed910add2ef91216a9bb920cdb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.dont-barf-on-no-goals.20180906224521.tgz","fileCount":354,"unpackedSize":1265787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbka6DCRA9TVsSAnZWagAAnBAP/3yDmnjHJtmudNO9ZtYn\ng0xZAmmtCqPdAm54ZmfQYrj07CNbzTEbR6jb7i2KWDce2//uGVhPcFbYwN2K\n2/61OPQliUn/cwIZG3ai6akYuFiF5KZIi/NRknhf25S5kNpuqcCuapx8GVxD\n/WZTn3HbAC+m5npLZr6h54yTZhqbj8tAsZoqtA+R2BDxXxuaMVUY9PNTgV+s\npnm4H/UheEwVpK5Vmmz8JGMb8Wb/w93Wi8ASmuLUH6/1jJugIzcWl3C7WUTm\nI6OaAKGSsUfoMlwdCakIK8v3hjObBvkLMs+lY1OF3bSNbWNt3Ykd5IFxYFxk\n6HaSa6myOCWRicECCPnPmOl6UElDNAxEgggw5qYp7XraIl3nsirtihH2mqru\nTUwhAkWNYLwdKAX8J0GmoNSbvHcNln7M6ecFVfSSQnmSL6SsIqhoARHiXcCN\n/TeJVGV6Sj1GPobTcjRk7R1Yuzy0XCqF1TRcIwvtWGXt0Bf8N7JbSat4bkYX\n25N4Xddn8fUnj2VFzBslGMIF/gmuxtZUGXjWP+W/i7Ip98gZzix+3cZrdC4U\n/pZa7WHRO800I2ZKmOrGaeAck4rTdC1L8i/C029wj7N5oZIdDhkAQftjwL9e\nneeotmd6SQP8Oxzp8Sw4B3+GOtV9A1ZTuGmeovkJRT4SAKqfbD1YzNOgYqVh\nfjqW\r\n=x2Ag\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDivaXdjHZ5jT1L+SCclGwu7JWwYSOUdGPrqNkMiNAX1gIhAIt8O0kOtAyNCTzzswu7xDnH9jDgbyLXR13ZFcu4CqsM"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.dont-barf-on-no-goals.20180906224521_1536274050791_0.19136874735390053"},"_hasShrinkwrap":false},"1.0.0-nortissej.dont-barf-on-no-goals.20180906225943":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.dont-barf-on-no-goals.20180906225943","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"3b86f3a317ede0f6c6f028f448aa6e865f892e2b","_id":"@atomist/sdm-local@1.0.0-nortissej.dont-barf-on-no-goals.20180906225943","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-1xjsXyRYMgVsUEO8So0n2FrRZp9xnx9dt6Ney+PMUgNqMMOp+ptqFaRMpxNBYuDYaJRJHkLwF6Z1hb8eBsLJqg==","shasum":"0a9c088372eb2297e7976e6ddec5e67ab79eb645","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.dont-barf-on-no-goals.20180906225943.tgz","fileCount":354,"unpackedSize":1265789,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkbHgCRA9TVsSAnZWagAAg7wP/0uYJ1wsp/FbEUBUDHe1\nJep0ieYlSCahoRz1HUI1LuPZC1X0/7lEKytGGHBnnp77RvuSzafnBu1ohcdh\nXyfkLXXXBWJFmaasAmHFLQQ3aYGVUEN6Mzn03FmUiVjfBwo+fsJLfKCEht//\nVdCL9BMZ9BVJWMZ6g2L1aSzKPn/mHpvHfx7cQ4YVVvshGIG7e7jGmVF2Gt0b\n7XALJLyUshgM8mcidIMIx8FCdioeqg9H118DXdpXU0XB4XqyhSe1SxEEcY5j\nfmUFpVO1ilfzEbip7grI0jl6nc51fXDLquBx76PpPNzif+FXkauzYbw+JteK\n5CcCPq5OcpgS5DCeJb3ZMxvdVkA6K1bCXEMRcEHlN0S9YdKt9RxmRZIcoVge\nRGaYJQ40wfpBdm8Yb11eRUbdFTF3aIqFyoN+REMAPH/7DH4URxUvDjgJN/j1\nhJ0j1D7h2aKUAO8HLEDZ498WO9Qc00iljQfUqffxOxjl0Ibko6DWNhZZCiIs\nrt3hq6/uUaDMV9eUwNWDp1k+zvyjRTKQRzGa1d/U7Dz4tUH+MASzuH7rK8Dh\nJo3jY0DrBtXWeSF1N9ZnL6BMDqXZT04Vm4qhRWcaiOUesAxX4CCjeW/lD9nX\nZwGNiOG3AH7LS4o16ZmYR3MASp9KkeVbes6AdBDuS6YEc85MqMGnCMRvx9hQ\nCDqc\r\n=d/GU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHb6Rn/Lm8dJ2FaSYe5FRTOg6RRvPfamDXEkdycPKh+sAiEAwLh0w5siTy4ehzuZpM5rvClJvat6tDGo28oqBiGkWqI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.dont-barf-on-no-goals.20180906225943_1536274911715_0.0914915350692016"},"_hasShrinkwrap":false},"1.0.0-nortissej.dont-barf-on-no-goals.20180906230508":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.dont-barf-on-no-goals.20180906230508","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"b1b57d03a60005916576fe653b1d702db6ef56b6","_id":"@atomist/sdm-local@1.0.0-nortissej.dont-barf-on-no-goals.20180906230508","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-HkuPh4NT/BiqfUDG6TPHLqtdW1Dn8Ebk8aitxtG6gnjJ0NzRg+nvB0lUutdjbutiOteGX6IBiHSJfWaFO2UF1g==","shasum":"770dd7b3bea94191ccc02e4f349bee008e3c7fe1","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.dont-barf-on-no-goals.20180906230508.tgz","fileCount":354,"unpackedSize":1265911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkbMPCRA9TVsSAnZWagAARScQAI3dFKBh55VDLT44nRPX\nHWpOY/sD/cBXZrTbVeSaTqtALmNVWewvx/90TKn88rFHaERSrcntZc5NwV4W\n12udYN2i+9nnmwAQozP5kZ99xKvJvU6M1dOkMxLw2azo/5pqHD05cEhtK9dH\nZQ4csuDUaY9mMsvHEJ2tBFKuJ7fT9BzTowE+wacvI6j9qx18UW7BdbcBlAGz\npr5uJ2fEyveWRJXRoNNae+s5BmIiwexS3i0EmkbQQUPffX8F0Xth/z2e7MWc\nsakjc3lJeumLG7Yg5EgJPSjxY6Nl7MMqtl2WA3l+ZttqMVU2s9yoK5p6CBpS\nomNXkUy4T9mZhdO21dSz90/0M3D44pgcka3g7jTe2Vrl5sX5ii/REdDlJJu1\nj7AdcfrwGUOZWirDq2+a6VqfQRmMAUPzu6JPKWjd5l+bXW7uwOMfRDfzXm6i\nxrmNb+nwoZWey/B/BVbuSKRJa1q6JuOhPPfz34l3ZjKGwH72EKlVjnS6PrTS\nB+pXMFFVW2j+aMluUbUpwEEnRLlKH5xqn6xCNgq+DRTrpIR/bMawqIM99gBd\nSPx0IQZFWM2t3whJPP49GC/LLBrWwMwHIjAb1C4i+YueDrMPBI277uxrfpTr\nzkdBHkz72drJY9hiVf/QRGyC9CYouWMSi2KFOtQPIc6v9zwKbGOdTgUE9Sub\nRMvP\r\n=Z91g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3T+YK9kR+1MoggFv4EoUE//FnMd5i5oEbB8AT5ZwgOQIhALKDCzLM6+wBufn5oXsr3t140Ydcy2wSuId1bEfyN1Mp"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.dont-barf-on-no-goals.20180906230508_1536275214379_0.9110963437171193"},"_hasShrinkwrap":false},"1.0.0-master.20180906233041":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180906233041","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"0212a63e96144ed69725589545174bfdc9543961","_id":"@atomist/sdm-local@1.0.0-master.20180906233041","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-2KUWSaCod3XWTWnPRUxoUnv93rWUd12yh2ZMRIkSdUvZjN5wNs+q6UOXr4CEeby4zb870VAYL97W5TTrcwLSQA==","shasum":"7b8f25b9cd3968731eec721f4b020b805e327f34","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180906233041.tgz","fileCount":354,"unpackedSize":1265886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkbk6CRA9TVsSAnZWagAAR5AP+QHJ7hEJ1Y9QwovneUXK\n7dwuZD/KgOgADCmWYhPOnJzYr8ehrjL8o++UHvt92Ngt2qxeNORxUTeaYGVI\n/coBJCaapjBXPVExUH60kod9FUt3hHVj2ym0llmYPkg87hquAUleCg6RxVvb\neKoYYzbUa5U3MD0erDO6G1CUUOwgIPtHiSBjHnnSHC9zfr+XDeezAkSyl3KZ\ntsr71No+OAe4kUZZT0AfgSXBlSI+Ni8wACKwTLL40qhqXML+Wwslbf9Cdil4\nPiXfxw2H6dlv6Buzy6GoyU4uohP07sFZUL0rPoEVZtjUK27H0OVOZij1L4+9\nhvcdC8qLpiTcA22Q1WPGGsF/tIBG6HNrUPUDMs1Cali2xGnpuIUp25YlU34A\nmLGBXJooryU0iZcZgpLuhbm6OpDDonTYm6rj1JuuLkxQvlS2lGrldJ9q2S48\n6yMK+sjNNhs4i7MgSSErxLa2BKXObIDwxiSxWvhHkZ4TdsiM1Pwm3udtombN\nDXSfLw81TxfUS9yCg/PO9pvVkyHyyIJ0NzgBI2dzmXuKq8GD0opzPglkt6v8\nsH3d9ybfKu0UyN5TEZkLriGHxdOgHfNNS8xBKLTDf4wixMxCqyyVGJnsAMPb\nl+wg0b4Y6JY0cj8wO2UDkonrUKpS22+IHKXknRf/qKQncJq23MM/twIrEpaF\neMxX\r\n=cPGO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHRT+fs7AQWoiUWI5/mgCDefu5nuswOXMNwkxjhygcm6AiEAzUdDJj0DdocOLBi9eDrk5GtzzeTL64AvPdTmEsVYLd4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180906233041_1536276793641_0.14898277917004377"},"_hasShrinkwrap":false},"1.0.0-nortissej.default-transform-result.20180906235242":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.default-transform-result.20180906235242","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-nortissej.default-transform-result.20180906223648","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"51f2cdabbde712b98cb49d7ff416f54ae1b7ea37","_id":"@atomist/sdm-local@1.0.0-nortissej.default-transform-result.20180906235242","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-EZm8GpAwC0j9Ps/zxBpmwnRlLQoElg/T6rPOS4ofQ7631q8JbnuPQ9iuoJyMBTERyJhjBAGOt1KoUn+9rqE9XQ==","shasum":"181f636b9fb91286cc448cb5f5cc8485d6efda60","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.default-transform-result.20180906235242.tgz","fileCount":354,"unpackedSize":1265741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkb5HCRA9TVsSAnZWagAArNMP/0eApZ/8V5SkbCymJFZl\ny2PrjImvR9iNQXc3UwXtlIv+VC6hT570ORcxZIxImB06OJ4MIKDfSYkRXmjv\nphhqCCi3esIMTGNBDBI1juSHl7N2bcXbHAtVA4fj4Zm6JZdUWtLqBaBC+6ET\n6VKzQhHTojNnrO8R698WEg/Tl3nVXxqvnnQMQjXHlZKQ85LJuoRkEP7C/yVi\n+X+4PD1rjWqmmuBY2WWUtgHYnfVegIFWJXAlesE0wO9oYxSkbYA9ZBevHT50\n8GpK77dI/x2vD7ZcPD2ohh5aj9QDChehxRqSy7L+F44DXhCAdqCdV1fzlmmG\nHYaeh59WFdtfbI6Y247RwBtzLOBFF4s84EqrLKQwVspOQeJM5ssGgBkSW9/E\nQsfIO81uqSx70wTpN6e5ZgbIsK3xOzeRW5UrLotG+baVjDdCcrKhz+k+2ZXa\nH5oYhmwCvdkcD96aV+psppezWX6aFZWUke6vjjHmBNV5MueqKqOIHxdGNN0T\njSuxeCbmreDPXz9pO5+nDTUW7HprNgAwBzlehDhmedi2JFHJ3GVf2a5CNQBw\nmGVlwvLJrYZfk2Kj/oskPYJT1nKYJIjCdd6VUfU++kumFFjmsa+NQvrnc7j/\nRUHDGai7Nrs9CXvSHXAAw/eYx1P4rv9IwISytknKDm46rAoQNsF8dlEKM7tX\njReD\r\n=ISJi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBKORxqxFe9FSbL+dVQOMD+om34Aotwqm3dODqncSRrAAiEA54CesxDXNQsseQS/GqkbvMmd7zEFw3WaO6j+eUrWdgI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.default-transform-result.20180906235242_1536278086741_0.09755632895398159"},"_hasShrinkwrap":false},"1.0.0-master.20180907085349":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180907085349","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"920521fd4060368a8eb128e00cef8263838f7f71","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180907085349","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-HleKIRY677FDFBoZWnQMvuPuz5elDid9YTDndVRtqTEoKxRUWiiuAn5bcHgOliUicvl57fl6AVWc4TfSD+f5/A==","shasum":"81077870c5bb9174902a47cf5f65802773d56a06","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180907085349.tgz","fileCount":354,"unpackedSize":1267025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkj0ZCRA9TVsSAnZWagAAzS0P/1THGyVgE6wtkMgr0TM9\n0wTPuRdNAsrqq9JI0Qk9RLrCV59fgdtvPu8k7fo2Os8SchhzlgT+PyzYkp/1\n5r3xu50Yt+uahbVc8wjl7hbJFpRIny3qXc0DI9M0ipUAZ54cut+DaLJRy26F\nYD8KRPdcZ1gc1nXQNlqsLir94Fh9db4IGfWcRfkmWMNwXZuoTKM4If8tr8Fq\nUEaILNnmKH6CuQpPtREJpoxbmG72Xw2V7gPGlUxTvHvvac76vqjBMv7IkPyj\n0uWgILog1dkNTLRFDRLwtcrV6j3oCTa8qqm7WgG2frEzl58lIwe+TFdNNkAQ\nGFvnN9NOmZL/t3p4XHJvD9qU6TebjhC7OnMtfDHxd2IKgq8kj1xVODpTm0Ha\nFk+UyIwh/8fMV0jI9/NUvMoEz1R4uJBjEfCvSC8sPANryr1eej+bp1Alu9wb\nNFcAsWwtfmHVSgA1hQ/0UFb1SR492HmyO6Kal+LdmcTkFmFw2f6LpImKt/7a\n0GYszLGYEaj2Ibg82MUMGe1t43hAhgFtGFKkexBVKcDhE4Ju4R/3994wRNlG\n5Lev4+y1x/lsxG6Ttp9J1t58jZCgeEylyHcSMSp0HbaUJb2vr1B5fHuobAer\nhQt933/tKC0etbVPhUc2lkEd/6q5vjeTHg/uAzy1PYz8M6hU5oms7jICJW2Z\nedJe\r\n=q+fV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEOPBoDJeMfOwwCOqngca36OEb2IZeawXIo0k9nR2oAwAiEArzHoSBXhMNP7tKGPLPfE97LQNhRxzc5FX3nOTTkYvLs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180907085349_1536310552179_0.48645595933809793"},"_hasShrinkwrap":false},"1.0.0-nortissej.dont-add-commands-from-nonlocal-clients.20180908002328":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.dont-add-commands-from-nonlocal-clients.20180908002328","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"72784050926484bf14a607ce85e9cf120e8d2563","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-nortissej.dont-add-commands-from-nonlocal-clients.20180908002328","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-keOtl7erbLBV1rraKWUJtp78WmcPiCob99CrouNevnK2BZ3GhLH8iv3SCBLMoGWvEYMsv4Su9lWf5XXyjpaMAQ==","shasum":"5169ffcbf524f2b3b7dacb01f028877c5ef6097c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.dont-add-commands-from-nonlocal-clients.20180908002328.tgz","fileCount":354,"unpackedSize":1267058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkxcCCRA9TVsSAnZWagAAqmoP/RdAwE46Olux4JC6fISA\n1iF8OU8gBrLFqCNyZUj8AMD87es5eafLNJ9PYcszReninG7LEkABGORN+3Yo\nwkxaS+8gTab2Iq+rt1hpUPdV0NneyxnPpN6wClZCIfFbB+ahKMuapn0sw8xM\n4hnbDX06FPi6TcRYTtKBTpQmArik0CIV3JEp8neISTFumejOhOBUb3amwDY2\n0P2aOug0orLV0yaZDnBgtvWCVl64uQsaENJCPFIgI7M9mZol02DD98Ft97Ae\nmkOn2ubKQZsfEFPH1ZfHWbIa+UKTWFyTxWXc4qWFQphFDqQTC+UDz/s3AKUi\nolpOY/YDJn7Rf5LoxOTKHpyM6CzvuHqd0sZpeWHrC7ArjDYHHn4dwr3U0jfr\nkSo5W1J/EDIpaPw9NSjEYRl5Rpn0P+3S5kB93pdkyhTg4ljnqU2ecBCe4vvV\npw89QtfXmK2AZZDvdTgfjj6IXQSC5Y4p5rpFv94g9uCurSwhTHG3k3++ewaz\n34E9Ebi1h8kIuLDGAc3hu6dUPLPkd2hmOotuLmv8fMsGkZP0ANt5JODoXaJ6\ncKP03puoED8ZgbuStmgdWuGApjhlI68Rrg+EDFX78qZ81HhMaa9JNwmxfFYQ\n0DKZMecmSn/2tkPB2qtVfnajntinWXfZ0NjWfwmwLebTEpFmpY0pWeLpmAln\nG9qI\r\n=3ea5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUlglITArKIUgYudU5woYYaqZyzkfnKNHhzqK43k8ggAIhAIc08WbPqwoajILV83Vlfw7dbaZtgQ16J71CNGJI4oSz"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.dont-add-commands-from-nonlocal-clients.20180908002328_1536366336669_0.531444316872004"},"_hasShrinkwrap":false},"1.0.0-nortissej.default-to-head.20180908015245":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.default-to-head.20180908015245","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"266a02c5f02028f6b2d5edc73836708ba25eaa17","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-nortissej.default-to-head.20180908015245","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-uXx+dWkAHYix3S90Dkc+4S/s4eigNltBCaph75500tr022C+d1lUrTbDJHK46/mwFgBxW7t5PpRzPs8d0Hjj9Q==","shasum":"ff5e3e5bbaeec6bc4808d1990df825b688dcd5f4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.default-to-head.20180908015245.tgz","fileCount":354,"unpackedSize":1267053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkyvtCRA9TVsSAnZWagAA/3EP/RtvTZ0BJUb6DRVkGthy\nAC4wHyRQpcGyMJk8+vxcSE952CeeUcNx0RU/AHugFOhHDn1knG+CBG55xNzx\nH1HDBMkexpgcxPo8yilGNopFu7y6X/j59iH2vo7kNxRbZmwRJ2t/7cggNfGB\nbQfmzBBWcV1u9msi4w0EyLNHgleJRVB8RTk5gzUacDvnvyXlqjoh2W5dYO2i\nNxS2KL54h8pF5cMdSbTpocQqSy66buIz6T9eJPya9qBUugWDGICQ/PC8nd50\npwa6UY4GZPqs73eLsbZ1GFS0UVF4pFY4vv3hYS7IvuGMwjJU918PDXiwolZT\n718zFw1hzHtyFDFsyoTVKrKTuPFUR6N9m1AAIQfZkJ4RHelxDuk6WWHxZJD6\nbyp1maqizlSUK+1nmjh18dmAabtvgFznRkiGdHSrfh2haEdNYF65f6FvJIiw\ninEHekQ/tY5e3USEYOnqr0H9iBVIoovnpSzc5oi8dXWyqoUtBPzfcC+2OF9S\nfj5HdFKcNvDk2qr1a3weXZ6nLo/zlbA2lt3aAYv89Dyv/hWaxy3Vt5tB9w9b\ndsM1oMc6+vl+iZw84TVenSXTzLDcZUzKqEGi1BgVpVSt0b6dC9pfDZa8sV75\nU887O89eHFWWJKwOyKl9vVUxgQjgf7fUMO001qqDyYEqjPFHzhgYE+64zTSK\nD4m0\r\n=/Mvs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHoeewUP41csCXxzCo1d3g5IXgjxawE550Rooy4xAXy8AiAMIu9m3NeLBfiMBAvbteB9V02ufcsJ3uBKi+PyMft70g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.default-to-head.20180908015245_1536371693003_0.07023185370003282"},"_hasShrinkwrap":false},"1.0.0-master.20180908065035":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180908065035","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.3","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"ddc97eb40e66ce064aa5b7bd7a71244315aee771","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180908065035","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jCElhXNmyHGr5AX9PbG1fk+biABlyCa+MgKDJeYtdJoPyF3170/TFO28GFWs08fcyK0KAkGm4DndFX9Z6lP4dw==","shasum":"9bb45252bcc0d6f070690f147f9b2d129c9bfc20","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180908065035.tgz","fileCount":354,"unpackedSize":1267034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbk3HNCRA9TVsSAnZWagAAyUMP+gP43Yu04CeG1WzZexWp\nhaTKBhUeeBVBId58Igv9KShD+IX0aDvMReuQMA42joguUo1cib8v9yZWobzd\nux3ZcIw8QP3e01dPnnoWvSD37nTwyN+AT0WqvTu7duBJHy816dtm42F4hPXt\n4HlboIjlIRFvwY6Typ3ia9VzWgCGwCEwPM8PCBJTV8i6Y195npxtXKphgeC6\no7iJPOE3yA3SKDzy5X5UO9Fg/usx8y4xcFe3UBuKDzJGWkEzZqG1ixcGpn29\noqgoVkbHlMBYq+8yGY2AMN3D14DApivcYdaLPqJLX5QDm26vX/VZxvgciy+4\n2yRON8tM/iFL6VkaXCF5yW53++C7XlQFVoDf9gUAUmR8BQhbbbHBiKbAQTLQ\nY3xxzPONOHOBcjlGDlXBZQvnL9NDVFjooj/LjyBACSZaklIeFQuHcWPtj7DB\nRtOul3mT8/u2EzhSHgjB91w6TCgcR9PIrydwIGeNZ6eFNZ6OMOmjEfDbUXx+\naJU7g9Rl/OBwFPj8v7/2rtgKwxrAxpb8q6tB6NUgELtDdWv4xc7QzacueUyk\nY7kjqAErc1ROC8zSTYpRLlJ5YdRFYONeYeOBueEWT9XNxxyeOG1JGIdc0pTw\nvsi9hMxxIlJfkxr1MPMCPcpcYDO3kff9oEr2S12IiC1Kx73jj3Vr4pW6H5RP\nM2Fd\r\n=baiQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBcJUDASGLQNhKdTaRts21MdY/T15wKU6iMktPzJCR+4AiA+0uPZCrxyTiqrATRJTOnUHnpwkVQyQx1M5+/Dk6qr+A=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180908065035_1536389580755_0.8842331082661501"},"_hasShrinkwrap":false},"1.0.0-master.20180908151320":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180908151320","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180908143715","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"67074556be2c69926f15d3deb9988cd0fd4237f6","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180908151320","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-59PAJk05j1S5TU/uCE8cLd8jwyLKn2lRyit/wx3+ZBFkDVvEG6biFFxTdfQ4K45aVZgsssrma6BWWyOw2vDFiQ==","shasum":"4e60f8a92a6fa3ad25ece2491346a94ced85a1b7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180908151320.tgz","fileCount":354,"unpackedSize":1268539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbk+eeCRA9TVsSAnZWagAAGtwP/1S7I97h1jaRx8oOwPJL\nY7JZbncRnbNyfa2ZlUPNpq6qy7UD6EAYH6iYIp7zToQX0q8we2VDUbA+Q0rg\nz93cf3/rjGj7JBCFENA0hPo0hvPj5W7xdyOj1BgjyPg5b6KvWNO5yXQ/GcGa\nHomF03PKRvBMPq364tx1yndYVQpGlbfM+KnOTnmBlsf5ztimmUFEc0QYzR7a\nm6BGiZq78QgQcdVp7m/k+ffSiNvXBeNbJxWRH3BUnEEtKw4lDCxutyCnJ/QI\nsJSHgO5mjYmW4xBy1JqZh51WbRzWViNkWSjKQxmqUoq48N9u/21WxYEHoDt0\njMiIKpWOSM/sMN+G6eOiT5PymekmBdPCuygNu9/uCgwMB6eZIvroLjZYYbNK\n6tQVU4H380j8dEg0iuqs39Yr9U67qySH8/ZNtTqM5DtLXxL7hPxyUvgMWMIx\n/Jj1vznRtGcDN+5h1w2PJj4qZrGQSzY9vUoHw/XlUP7xtuFNzl3X2JrG6YKL\nJQg22UK9iYcJJF+tU+vUb3FddD6UdsOVSbSvU+Jfnx0t6gea8qkmrcn+ADc7\nPTaupZEvMMiq3CQHP3EgE8oOurwiMnV+yFKhEbljvFnvQhe+nyFvujCKbL/E\nBLFwY+rzu9e+Jf9hahjbyBousTSGYmHzhwHccvOqQWyaNdfWugsnjSrGNc5i\nx8ph\r\n=FCI6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC1iXvyy24J/baSQuChtYpaYScxmuPspB5Onsvhjr6YIAiEAnkMPlQBObgvFzoMm3SUgMtgTH0RDrjFfdUp4j0neEk8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180908151320_1536419741668_0.47231849568819206"},"_hasShrinkwrap":false},"1.0.0-master.20180910161935":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180910161935","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180908143715","@atomist/sdm":"1.0.0-M.3","@atomist/sdm-core":"1.0.0-M.3","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"752277d2cfc7df0011a06b8ef6c682350e507468","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180910161935","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-T9wXtl9Oc1iCLrnmjz3oC7prpd6YFQrrtHT/dOKnze+7zzIADPafJBLizacH8/KZGnVKVK12njP7V9ptnZA2rQ==","shasum":"e9d1492e9b4ce8022ec7ff79e191230154822834","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180910161935.tgz","fileCount":354,"unpackedSize":1269204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblpokCRA9TVsSAnZWagAATLEP/A4TyB1aJ3gEnq0BT0BB\nf3opErvjt0rHxBlyekPpEyVOrK/n6BgS5K195qKPiGuHDZ0qozD2wASJa5Nl\nd4gBO8GIRdu+AtQFcIlZlAsHLfuxIkxvIxQJAW0XirmEQHumZn2Qz7+lSFKA\n85kVUwi/rjJ+G8X85zWZLNVip5c5Ufilrzm0bCQ30DT9OrS9AGQ/e789GlIn\np1XtE01ymlUSZ9/1QivXT0ZWtV1BQzLnOajmeTkP/5vFbr9BZr7t572ZVsV4\nsTgEVCFVIJ7/IqZh7Mdl4i5Nu9R1WCbPmUSPZE1cfPJ0evulSLdaHw/6bymJ\nigRSuD7mmipnV+QjMJw33EWo/LUeRgqlV5mFm7MXpMVSmJ2J00YOeD1K+3fJ\n9dWNTMZWo6PIj6wHjTOJ5blatXNFKy6oIYgvlD/OH7+pTiJ/hazmPbRnfyYh\nyw5+tsT+z6P0qLccmJVXZRmEPdaMQnWCJkXKvlkKBmzARhxcCLPozKSpV1OQ\nZksgqdBp4+djlN+nzuN+hTgvKBrcdlXscByLkqgk3VqpkarbyOB1KM5+5Hdy\n2CYqSNhkfaRClxNALzOmbTcCY9yQ0ISp0Ii+tjFOSLY6C6AxogYKkPmBwa+G\nvgp5Jely0SWRMgKafUaGjielSvdqTAYq21Rq1qnORRWy3mqqCWm+OQr4K9Bz\n6pEn\r\n=O99y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICA/mKD+lrtVDZMC4GSA7mZp15iOonjYshcbDRcdJXCFAiBlGov9irQg/7Cw7JJZg1VDnISlHN8RUnVigYflzp+3Lg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180910161935_1536596515540_0.5913328983754254"},"_hasShrinkwrap":false},"1.0.0-master.20180910174550":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180910174550","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180908173001","@atomist/sdm":"1.0.0-master.20180910070004","@atomist/sdm-core":"1.0.0-master.20180909211148","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"a248faccc967d826a608e59d75a32cfaf57faa73","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180910174550","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-EHJcen7G/TNgqigIm/hx8ifmLgsHZ8602QNsW2fvhf/b7P0Jk8JGGThqD/b/onutlileJxen5eBTqHUGbYsg1g==","shasum":"9f048b961d235615f893b62a76f33a0d61e920e2","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180910174550.tgz","fileCount":354,"unpackedSize":1269370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJblq5fCRA9TVsSAnZWagAAQb0QAJLohKidAPZ7SXzr/6Jw\nfb9aiL8RnfzdpQMq1iXNWaH2aBtuTX4arxIxJd/ghPln1GQ9J8Osx6ENDvf6\nAp1My4XzZHtroARB/8pEW1W8kElSLd5dwgooa3542YWAOH5IOIeKDGVuYa28\nqV4VqffyL7mM+59kMgr5prFqyic58i0amvTDkOEdiMThxDKjhnpkSoSrnzPP\n4uFSsQUmNco5yxF12g5zl7PIQk0NzSao6soigRWQuF7bjhdgBFrCnt12CrTf\nzuFsM+NWcHgbTsyssXC6MJ9orvlWQw8KY7gQ6qXBgFgFwkKTocqo8hxBDGpU\n54ogNxYEeZTIk6Db3hnILXP+4a2pb62+ejbh1DbFlqr+G0HGRjU/TYKbvBB9\nL4uTXRkc5kh08diB3neH2+4agkYjQNsFdhoPLmO02SSm6WBJREYZmiRalZj3\nsKIKbGPz+QbrC60ScsBUK6K3rMyjnS7fe5Q5a/IYYliIfd2E92fRIrDOGZkY\nEuN4DATNyfLUPVrT+zCnmXejC/EyaRSZ9WQelYpVRme3ZZcyPN0y2TQp7afa\nYu5ZIuCm/zllsgkChghNU/iwWLxlV10UIhjWQVZa+A+Wde8g16ZvfLzDOjZw\nC6w0YHzTujdJ07gUiiphZnOfpJubAmRPF78S3XnP1jQDNJ+NJ5VGyOHwxO2f\nEV+b\r\n=aEv5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtGO22+pUG9kMSIm7a6Us/7lRrjVxq9utJWjmFWc4i0QIgfPdTcqC2aKJieXEChwePR07SLkVvvgBN3nPH3rg/0e0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180910174550_1536601694507_0.4166530678237994"},"_hasShrinkwrap":false},"1.0.0-master.20180910202515":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180910202515","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180908173001","@atomist/sdm":"1.0.0-master.20180910070004","@atomist/sdm-core":"1.0.0-master.20180909211148","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"34b3cba980b932f097ff00ef7bfbd5701ab3b6d0","readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.0-master.20180910202515","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+YP6FGbdFCI+Ki7pFWUi7xXeFkb7RqlBJXTQg8DNa6kbPa+sK4JlDqDFd+9ehrQT1e+UkV1NdR9UX1OgbzKxRQ==","shasum":"5f8bbd890d8ed728f46845b970772f0446cb570c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180910202515.tgz","fileCount":354,"unpackedSize":1269360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbltPGCRA9TVsSAnZWagAAC/YP/3LcfbfNKM6VSGZd+6aH\ngo8FWi8eYXPcv3/7k6oyjme/SmCob5SmPnwc3S15cQTIiwoY0NaF3O3lxKT0\nHf+dxnp3cGXwsw9R2TW4ZiStMXyca8Rgwd6wIHhfVbW5PyyvIHklYJomSYXK\n+y8sNUA5N9HKOIasqy023gG89NaJj6aIk5Gefs4TvfNYITAVIfplKrE+b0eN\ndHxUBu9TUIOeZwHx7DpWo9aEVG0KTg8Z3yS09xGLszQ2gALVKwAyjLL92OM2\nR3wAVx/tqHWTQPZiMvjsgHQs3u+Wi5cyTykQLnzvzfKb3XYWzqw5X5I25RGr\npe4NjRfXyjtFH9MGTTennLvD9wxnnSf0wEXRwMJ7eK9EactZkRnr9fngVX2j\nW1ytSKiOwcswO1+G834Yz1mZoYAxxYsRpQL72cCFI96qqbfmOAyj4G7Vry0Q\n/V3pMG009ywuBtOkF3qTbDlAvFHyT7JFtFQ6v0FBHk5yiA4K2RzM1NURH48x\n/ie4wLSv5OOo0RuYdmnhSSc9SGzgse4ENnz1c4ttXOAcp+UcqEaHYJhCCxmv\nUlkK+NYyUw4q95H9AnMH1qoUFUblI1eX57kX79w4RLleXilG+DlfCdooOPkO\ntw0Nty9+49x24wr86FFDsvk4aUUj6AN4M/W89zrTmS4gFwaSGcz224eXptmo\nIGTV\r\n=fz1C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBDwbzCjII0eji9I0CKtg7IpeArEKkxSMRCVM9mWkKgAIhAIUr6j3tyfgyd8mrTsNc3KOhJq5uNZzMSfPRuHSpskxM"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180910202515_1536611269839_0.14730509298555705"},"_hasShrinkwrap":false},"1.0.0-nortissej.deep-clone.20180912040514":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.deep-clone.20180912040514","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180908173001","@atomist/sdm":"1.0.0-master.20180910070004","@atomist/sdm-core":"1.0.0-master.20180909211148","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"8b0add255d00526d984f3353df6c62d86c0a5812","_id":"@atomist/sdm-local@1.0.0-nortissej.deep-clone.20180912040514","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-oUx5JAdue0+WPfmGnG00+fAb1WNRNXFbSiw1+f5vFPZqVG45t2UXWcu3uP1+4AdvXps5TjAHiFA839hVfio0JQ==","shasum":"b0ae6d2cda28651bc44c0a41e772f0d70e9a6962","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.deep-clone.20180912040514.tgz","fileCount":354,"unpackedSize":1269856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmJD0CRA9TVsSAnZWagAAzNAQAIgvcgjCYzHTl5aYsUNF\n/XY4HdtjRYmN23wWi4YODYkIyDQ4pKYfnC5kahMSzeUXdUUrVZbmMQHznnY8\nQow9JyPLy14eQh4alYsJ1uJypaHe7mUOZbYt0Mw+Snl6kpqgcn+5+S0qbRi5\nW7+HjwQF/USKpdGXFFTAia7pBD3egjSd/57D/PXXfNJ1HDjJi6vmZjeCsAwe\n+60RIYczkgwpYM204sg7r8lKTKg1rdd/L0RUJKh7d9cQvn7AJxds0ghf2zVb\ndDoDcy2PU1VLlp6LyIC51CAU+EjDsalcINtqG/xmCilz+c/kGTOxxn83V1YM\npNzG5xVNEDEg4NasAF95si44E8Xek2v7r/fkmluj0uflj4NPlT7/m7NcPAKq\niHE/HFDR96TXvnoXBo4lTWcKdpWxQ/DGxrBb87hz6Ygknv2MKHOL4czadaOt\nuwT0DKovtaH/CCCPe1UqcH5edXJrLSVZCUo/Ehau1FI7c4m4YLz+Hs+1gZtB\neDhVZ4N7Ql+KpE9agL7qeuZHPcg1YPnFrfE0SR2YhqOCoRWEzN0LEvQNUaKZ\ncYcEFemYq2bIOXdwv7nlLl6dWAt82ahWKtgoGLFKj05bbzvAVUeNaCEWXpob\nNzt+8xJ3U/ICjTetu2aAxq75Rl5Q1K77LlY67yesS1xsEdUy92SPP3vKZPtA\nNMsK\r\n=tkuo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBDffaIQV6GmSWe1ploXeVOE5mlvUekRHfIF/Xo0uTcAIhAMC6KI3Kd353ug7RPLDRtG4vY/yG8kRQcSkSk2hzlQtk"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.deep-clone.20180912040514_1536725235631_0.3825606674182902"},"_hasShrinkwrap":false},"1.0.0-master.20180912043733":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180912043733","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180908173001","@atomist/sdm":"1.0.0-master.20180910070004","@atomist/sdm-core":"1.0.0-master.20180909211148","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d2e317044cb51a9348ab348d126824d7d44b8acb","_id":"@atomist/sdm-local@1.0.0-master.20180912043733","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+6MEhWDtuv3rHy/FQbjr16jQrNPzgvTjgIlpCMy8HQndywQoPRfxDSBTdVSqULwtoKJ6L5LqziZ4eMYmqasLAw==","shasum":"41dd176c6dd7082b7f91175d1b13bb465c7fb601","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180912043733.tgz","fileCount":354,"unpackedSize":1269594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmJiaCRA9TVsSAnZWagAAPUUP/14buX7poPFpWq3G9aq7\neWdj1lCML+2fbrMVbzqSKWfHP5sYqHDKocBHM35Y/IO8xYPvVEkxXLNx0k8U\nnB7S3IUCdDknyTl/My3yoYh3BJ2scb8VSqrcWi9K5g2dNKD/+97cZ0zdyZAp\n6Am4KEtEGMohD+oAvW/ecVKCSnxm/0DFXKNS5IVOOLgnA8RltL2uZxf6uKDl\nzgYr+MB2nIJfnSBZqDYO1kTvqAuAL4o9kfam7A8rc6t2KLN9Es1QI6aFI3aY\nyhS8bq1h0YwIyvFJYqmFM+xTm2GYCt7QdkDdem1YpDzRi2OcnZtg7gr/P84n\nGhaPfzL7hCbmOg1qk5ZibUxy1uVzVFi4GQlxc2JUo50F5WRtG/hcQR6ZMsrr\ndTMah8lmxzloySEPUrckjiYMxg258BIQhR1rFrd7LMM43OTDFPic6uqiGgGC\nRsLSfDC+KBiWAYzHQpYObplKHm2hypEnZc/0RQH/zLHgXQJDeCn5svRbufJT\ng/LBmyC46xlmJBF+zD5LReA0MZArlJMcYPjEsumnkolGLVwOjSrMoX66JsHG\n/cLa9whGhra6YSaKtqu9iaX1NZrAAFcPmk1bPCOjrV4jZWZ0ZerjHKUtywvl\nFT5g9cYtE/OexyauYrArQUtMGHYX2ied4M5d4tGAROxJjCV9etaw0KLHP51L\nEtir\r\n=qigj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAgcEGX7WODuf0wh1Ft0L2CfgEsYobpIuB/8Gjc9MY8vAiEAsi0F9vNWTRdWXt0eG15/p72FKAUwkaUP4IG+/XDcOs0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180912043733_1536727194046_0.6574274425571567"},"_hasShrinkwrap":false},"1.0.0-logging.20180912102628":{"name":"@atomist/sdm-local","version":"1.0.0-logging.20180912102628","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-winston3.20180912095236","@atomist/sdm":"1.0.0-master.20180911102033","@atomist/sdm-core":"1.0.0-master.20180911181754","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"b187b6660508ad8ed06b159552171d4c2eecdea0","_id":"@atomist/sdm-local@1.0.0-logging.20180912102628","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-07EUeuYSz6H4LZC8FuCJP7hA8WFi6TELLr2sJrW08CRLmOeXy+hLQ9bruKA2+FlSG9ZHLPIr3Vfdqv8kPCXoEA==","shasum":"bc5a1da0bb65eeb3bd967f1652c08a33fbda1ac0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-logging.20180912102628.tgz","fileCount":354,"unpackedSize":1269710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmOpRCRA9TVsSAnZWagAAJp4QAJWtzgMzqrKotncEFDhc\nwf8gpI/86hOQTTb9UwQVIlObNRqvK1nhS4urXQeeVw97igG0u5HPRxrPYmht\n5og3fFRyxv/mhU9xTeJ4f/4kZB5/THuk64WqPxKmS3N6WptJ3zCZZ1SRVXUV\nC3pYbZT2yIACcWmEBvOmW+V7HA8UNt2nfJz9b2dBPaewkXf/aCKiREJBDg8q\nv/8ilm22DkF9goWy+oqKlf/G/xo+UOQejMu2N0pX4ouEh2fDPB5SndMn/9DE\noyfSnCxmVM/AQwZIfDOcPYKJIQo6YvvN16mC+wMj1NkqUAN0sWo2Y6kDDVU8\nxhHcP+1y5B6Ty8KEGdjfblT3c5sBFvCgFluAyfQDT62oMpn8bUx+H6wkJb+C\nJLClWXk7vzaRjfmk73mo9zO+PNR7XDfsRX//g9E+kAjhhBxtRFF7dkqkmVzD\nqm4hd1jVEHEqETAI+XCyOPACH3MRg3LjJbSgKlj9aGIThsbZGKY0EsgVopKQ\n02+Qg7ZiIUWYaPCcwJAoVW1dItoqXEsO6UOCaiam0hViFDIOVtTh0dJ0hRFG\n5w3SriMPoCFMWe0nqZDrTlwEUP5AVJkDquVG5OgHttzgh92xQ2gX5D4VuA5Z\nSaHpvZ8NJhKNCvkDYy4axQD2Ilg5+sVU5VClOclLMHTKdCLnBTnLGPDiTQyH\nHaTV\r\n=Qtx1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGtm8+aRRyDrcCAiT9uJxb8iqjVJx1XGaQlCEwBsmOawIhAOkCHCsNQzK2utB/u8ceR8OUemkYxSPEOSZjrAqykSB0"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-logging.20180912102628_1536748112970_0.988255314421449"},"_hasShrinkwrap":false},"1.0.0-master.20180912130018":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180912130018","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180908173001","@atomist/sdm":"1.0.0-master.20180910070004","@atomist/sdm-core":"1.0.0-master.20180909211148","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"32a6d815c210b246730cd8d0c0226d01e740aa0c","_id":"@atomist/sdm-local@1.0.0-master.20180912130018","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-kZ4sfVGu6cJTPG8cc7XiY/ujuCYfzwHw+rarkGCFuzl9g4fBotRlBj6ISqcSAM3A/MKyWydPsjvxVAu1njyj3Q==","shasum":"afd5a2397534fc484d3f9d290f195049d0e59676","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180912130018.tgz","fileCount":354,"unpackedSize":1269965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmQ55CRA9TVsSAnZWagAAM5kP/3gwLarBA/l/BaqFjksg\n85MEvor3ioapYJbtg0erwe85fa+R+dkwUA3oEeiF9i1r09AE11YCS7ugjWNy\n5M6An434c6A/I5bJqqhPaWOfBfiGVLt73Vhdy48gNfaVmoCclkyHevn5W06N\niLgA/L91Jj7osk1oiXmt7kx9bLrr5mylg2baW3FbjEp0e1qGPebNg16k6PL/\n+nLYA+la1lqyaEtUMQiqqW5WOFZiaeWi0oDgoTAkqNRUZOjMgLLshE83gWC2\nKaE9BPYnaz6OVOMTWcu7PySQH5ZR0EEhEjqj3t3Dfp+QRTdf9qvrvsP9Yre4\nKERz0MR5Xkif1CVR8QpPYpm1KjmBmg7FU/QwnR/CsgJZOOLfDxDc9u4g2ETh\nnaB7jR4eeNmluk/7ymEXL/s3bzzXF9aqongZ5CyY26Iww49hot6ybCkbInkg\nIO1ubbgn7r0Eoo6R7AX2dTCyqN+1qCvVI7ZXoSOq8BzRvaBPvjmQp8MfZdHD\nWGpeHCo0+vit0Xi9xk3JgkXibVIcjp5vSZIDRZz3AlnSfbX5eBufcIAyQxax\nZeqOWkIqkzUEznnqOu77HFlmQwAC0HqMjHC9Hj6swm4q1q9t9YE4X/dBkQG2\nN8m0uj3Lc/nGymgHMefhSdUmDKAfS9ovhbDSQ6LX+ABBGLCBF5AzGjoEcw3y\nn2jX\r\n=Ado3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFEtLCZkrLqONMNTIAu/cIVbl5g6HTEMM1vqBPfEb4t5AiBrJKNbjcnlli9O/C99s/U0h6/jqh6S8VRnZUoj1Pz4ZQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180912130018_1536757368733_0.37789895573656196"},"_hasShrinkwrap":false},"1.0.0-master.20180912161536":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180912161536","description":"Atomist Local Software Delivery Machine","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180908173001","@atomist/sdm":"1.0.0-master.20180910070004","@atomist/sdm-core":"1.0.0-master.20180909211148","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"353162d5ff480ff7103f9bea6de1c01b27116c58","_id":"@atomist/sdm-local@1.0.0-master.20180912161536","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-9zJiIa9xCDYpke7jSSiAknQfPpbb7m6zx5eWa1p/d/TQV/HOkAjRw2dq+pX7XcjVl+KihSfnrZl4ptoctJwH0A==","shasum":"9e3edf38fbb250f563e56556299e7b400978815e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180912161536.tgz","fileCount":354,"unpackedSize":1269965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmTwrCRA9TVsSAnZWagAAR3cP/2lcAmkF08YfYQBgKMDO\nGrof4GpTzue4bkVWbemxoKQedvS/SRPmc80S2IBcLDuS18ZxxhWxcyYMP8N3\nCwP58qSlqghw1HbZ6L71WliITogi/L9wHWNWbtmYA6FGge+4YhXgusqG8COi\niad84TJdWezG0bgpjhU8OmgxcmJ3fzmtwulr7D1w5TrusL+fRjRPFCQVhHoC\nX2Mlqm33+yFCe46NtXlVnazUOX36xLubBcUEVlqIWElJjUCSQVanp4/Za4L3\nTaTJDixZh9Ob0T7uTdF0EcUNyxxNKuip8y5WlBTNmDxZ85CVVZRZMdE9jtzE\n+/6cWLYCsJW1GvfONht9B08fqj6+Bqwn4Oul9UH7Pt/BqwUAjMPO+GFlspS0\nlMlvRFTV+9d5ldVPOWDCnh+L0wjd3xdl8XWruDvWDJbTF+Lb9LWLbR7xIL5I\n6ixrOYynjiD+XZYicAxJgrKL5sm0n2LmlLWcrQ520Kb6b88zG8owzVBXC4y1\n/OweJSwxrEwCTITxs0lbeRnUS14EMKBJswUIVyeHijlQGr98bE3I07OTgsDj\nAK4YTkm2XSOTfkPH1OVeg9jm22gFmH2FTwFMJBV7rU9AX20DbW3uL2cjZVBV\nmhzvalpWaLRbBrJstyphIxCS2GCKB6/gU7AnOdSqaytQkg/TCFUC0KRXMN4D\nLrG3\r\n=laQI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDdx/hDb1LUq0Kelhsjbk2FHFtc4Co3M/m5gSzIrPGG7AiAEa5UOt0/O3vs5M1rgyQxbemJRG3KtGIHQ7oD3TywuTQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180912161536_1536769066364_0.7325593035917475"},"_hasShrinkwrap":false},"1.0.0-master.20180914072630":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180914072630","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"^0.9.1","@atomist/slack-messages":"^1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-asyncHooks.20180913135347","@atomist/sdm":"1.0.0-master.20180913101258","@atomist/sdm-core":"1.0.0-master.20180913110440","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"7ff342c013fe77a49dd716ae13a30e4edae36987","_id":"@atomist/sdm-local@1.0.0-master.20180914072630","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-AYH9RuyGTc9thCOtv65VlAqTBVZVA5WZZEUgh1HJsT8v6X7Y3gXfGTlm+l164EsbW+tqhHoqlpGO8PRDGLgoAg==","shasum":"c3903ed6bc1b06dfe52fa08da4c98ed37abf099b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180914072630.tgz","fileCount":354,"unpackedSize":1271209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm2NFCRA9TVsSAnZWagAAg4oP/3OMrAZgW+ZJaXGdTD2X\nt/vB8N+Ymp8PEFyaVZLzc3VVmfXxrGuofxhjW5j38iPNtA+5KHHGh+1AEya3\n2KwiI6A2eME8yW/b7wKAeR5sJY4LqB4zh/1JhxFMPLRx1DaV7BxYUPsjojSQ\nHQDeMzlF0fXsURYRsZkMHxkJBSt3cutG3Y5SxnX7Tc1XsGHZkEssAJzk3eFX\n8XN94Ntp1sXw27Idm9Hl+LsfrawfsCxwHwmLLjuTQzPX1U6GM+gxDJ781T5U\nbthi84qyXmFghbFrkiKSR3zWVwSThauTxyEtrnK5jx8gLWIXqJLFdHQ3gfgV\nu0mi8GZP4ObUxUgiJGPejfEH4wdOH6uybuLZqiOia698/3q0UTxK5C7fMubC\nXH9+1FRCQV7RSokiL4iONdZ2N/E1fgs4bf+HkPhFrOWt6N2m6ZrWlkLBgUZP\n9dOVbZ+nEJHq4EmxMWNTAtY5bA39hssgcwkyaCl25TQxa8yUQ6ofCqNu5AX6\noVDTlAtkWqFNH6H6dZd/OxVvfDcrwG0MJRuBB2GrZX/xIyVTXE3tS/f+H8Nz\nnChiMsUvUtWETWDWJqtPzyxDysdGUNu3BMEYRQK4aPjQzK1oRjCPPcbJ/U4v\nza3plVgoBhbVP0r7Hv5jMyzoR60zi9zB9+qnulLkTeTy5QygLwyxbdKeV+Cr\nxRRx\r\n=whZP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEKqbYazqC3xoBayy9oS3sWD+5KQ+9ZzzVR+FlRhsh3uAiEA5YHdZf5W2A4PxcXkp1hX4qTcui4Dbde5rMPLCtq07zY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180914072630_1536910149043_0.9360285653272582"},"_hasShrinkwrap":false},"1.0.0-update-latest.20180914113934":{"name":"@atomist/sdm-local","version":"1.0.0-update-latest.20180914113934","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180914103733","@atomist/sdm":"1.0.0-master.20180914101315","@atomist/sdm-core":"1.0.0-master.20180914103207","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"6f342dd826f5d946b61bb868caf501ad2d6f762e","_id":"@atomist/sdm-local@1.0.0-update-latest.20180914113934","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-FpM548LgNyLJc0ne0gNYzG2jN4/s5YpABujPu7Sh9p0mCTWrKcliHwvyXQPP2dsGuSIcupm/f1LsBTU5s7kL8w==","shasum":"573e719b209a2fd4da8e382f904640672c82d049","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-update-latest.20180914113934.tgz","fileCount":354,"unpackedSize":1268177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm6vqCRA9TVsSAnZWagAAIYIP/16cUOa6TFZHVbkuDDTj\nXXaw2ICV+bPojnTv91dDz4gc32JGCFdn6dQjeAfYSe/wBCo9ox7PtcmKsxFE\nmUIioVG0RyUc8wLlAqRASqxIcRYOAXYBG+CFum1W89v9FgD2VULjOcfeG5mA\ncRa3XAcYaOo7RA1MUGvLLo6dEaWAS8ki2I8e7DblcU76FAZYPu1vf1CXCkxX\nA4YWBN7FMxD2TgQK1c3awigjlfxwGcyQUf895y2mVICIR2D479nG4vOZAF/R\nc4x1NCQHY5ViScKIFvVxUZubj9K+P4UPPWWRRwecP1PcY8opV6GbxS+VFi9v\n0BiVMtgEHhKoQd0eH99B6J/dxSdMgzgS2f0nu7pvdjeoPEZqj1nXwQbPIOE6\nEt2jxyRWpgjDwNipo9+c+y2FanJe3ST+SDDbBHgfhAN2vRXN2eCMtNLhAAcp\ndvU7sisvDcqzXv5/PSOS7SjD7EKiiN24ougo2gUQ+S/9BHSFCVBpTIoToW2E\nkDMYpnXoEzWH/1FwLG7fUUmBF2KSk2K2Nw3zfwGcNiDb3J0521vNQSnBU8Fz\nZ0xFmnWZacGQBWq2aLVRKmNaQJDaydkwe5yToJszIV/3xwQaMF9a173cFa3T\ny4c4Il03Q7of6fEB24xJvY2uW+wuG+g6Ijf1RcD3tfipFSp4aOXyTvq/ZQz0\nge3h\r\n=ys7R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDGLPEr+4jR2+Rs1x8NeoKlbISw6GIxXXiWcWC9TO+0qAiBsHW3gSFvnhF2VD7ik+F1iMlyLIE4i3/BFUvhBJXysbw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-update-latest.20180914113934_1536928745566_0.22590353166009325"},"_hasShrinkwrap":false},"1.0.0-master.20180914124214":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180914124214","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180914103733","@atomist/sdm":"1.0.0-master.20180914101315","@atomist/sdm-core":"1.0.0-master.20180914103207","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"65f999ae40f7cf6aa160f747ee7c1b235e5b0b11","_id":"@atomist/sdm-local@1.0.0-master.20180914124214","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-1wmUrwbd3xnsbiUo/W0KTqzEt4SxvVO3QLF4R9IGruGfnpQk+t7vhb50p9n5oI9HdS+ku/SKEZkdfaVv0ZqaSA==","shasum":"b66a6ee6aa8c48854aa31cd87fa03142e22a0f85","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180914124214.tgz","fileCount":354,"unpackedSize":1267781,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm608CRA9TVsSAnZWagAALBEQAKLJhFOwd9b9DiCLYY3m\nW2nCojiod4RPpGrN0fOgpZhLbYr0rcgfaFteJqcb4pnB4jBBUramzC6r15ER\nxGsrzmU8Z1VEKcFrv1aJaDYJZvKXFNKQJkPessrxZaDvgSEqBoartIhEWEYk\nHhgYAegrxk5UQFghNaxnBmaFD3Vk/gsdktagBBr6aD+ROQ0MEO7NAqUntwbC\n8AUSvYkrwMKjp/InBDHAZkRD1zuB2demCQyVzm15VDCK8CyM7Pi4jF+gPaEz\n6NZ7B++sZ99N79A4rKnV/bug8Af6bCS/NkXWs3d8P2VNT+33feshVSjUDM/l\nRyWqbwCWZxkPfq3htUVU8aYnPprMrRGJtHCWDh69LHqU84IffTn7qkgoLDbX\nCy2sqP8iREio9REgTqiHZhGS/kdQQqNUEDRh2JUKpKtL3KBdDK34gBADa1Fo\nUt1nhFlJDFi9UAolmtCBqM5xi+hITqWRRaLAnpWsNV70+5eYkzAwLmHkK+Sr\nFuCWnYis0BW05E708npKo3100d9M6o4zY0RMVyCOJasjAGip1RXTNHfrIwoE\nNWYmTi20KURcj6Pvy6Q4OgpyIR83xH4Jrxw7O82rj9llLgVgCq0SA/3e/L7k\nThPOrGAVeTsrDjZuYi/aL2hSRLuqnH9ZQvQZev2JMDpkvCQ1yrbwKHrITW2b\n6/7I\r\n=yi47\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFvN6fxXhsYjRPG3pCbiuOL05AEsRyz1vYBtDMuJcSdSAiA45OxHs2DYBD0gv5oiudTC099ALVQ6wUaObdl3E4XccA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180914124214_1536929083868_0.3670329508840302"},"_hasShrinkwrap":false},"1.0.0-logging.20180914164257":{"name":"@atomist/sdm-local","version":"1.0.0-logging.20180914164257","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180914103733","@atomist/sdm":"1.0.0-master.20180914101315","@atomist/sdm-core":"1.0.0-master.20180914103207","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"6605671ab90ce5b160e9e39745070ecb92faa36d","_id":"@atomist/sdm-local@1.0.0-logging.20180914164257","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-rhkNIr5hSftCwgbrVFfivLBgpegtAiyU6jg7dLCoZXlRPdKTF8m7qBMMPiSheDYSeXdDrN/+NKgsv9RHSTZUtg==","shasum":"6eefd30b30e0adae6588445adc17243f62e68f83","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-logging.20180914164257.tgz","fileCount":354,"unpackedSize":1268033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm+WcCRA9TVsSAnZWagAAx9IP/0lFMeoVG8vFKaRh7kEs\nfDe9+72DYBNLonV8Et1oY9qflyaRf1Am4ZJT2Mmr5hGoeJErCZHJ40yp34k4\nmDrx0nUWajRm65n+RV35niV2gnGQ3LsvCkyOH1hCWRTd3AcL715/P0xabs9T\nBqhFwfummQPE0ehg+VuLsyHxXxNs8W7z2pEYaxAZ3thsYs0cLaTJgIZZ2DPY\nqXgU81Vwl2pnkFnIUjOK3hkdQ/+vWZzT2hEwGD6MRcRrXqWwXHHll7P0XG3z\n4+rb+hx8nMyiWZuvAXrkWWLpVwbQlfRn8UkDDrfsy2LnPbVha+xdlV+lHvJ5\nqgBaf0m8/zV1uJAhiG4Ka0NhmH7yaGssIFGmLqS92yELy0/BzBToFvmdQZ5X\n7qL5nGJLGeV1YLu/uHV2KgC/P1bQPvKHi/BhBSY8l5BAjOTARY6Ligow+cX8\nefiEnt7LgFXNc0G47nIdhVPB80PEb5eburiMYh8K7rKIQO9xLiulO+wB2UGH\nEk3NPSk0x00sbA29KEtSvMcP8ufyJP2oXDWUJB6mXhSoY9slbzgNBdLIX5KN\n0sCysFXVR0o2BEdPK08oNXr/aniNuDnCNWj1RCbotbNIiOeLc7jMC9br83QE\nJTMnZJA1QLn9Gza0jS9vozYp6wJ/o/S5J7qo82EjaWGcgA44Ei4cZ7kJNsy3\nK5EI\r\n=zhVa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG6i7w2AzjKuvifikIxD8X7+hocM05QoekAIQg4ygRo/AiEA0D3ea+rxof0RU7pl93r9y6zpZYWrm2k2fEQj/dxM4M4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-logging.20180914164257_1536943515426_0.16937964615574352"},"_hasShrinkwrap":false},"1.0.0-master.20180914164924":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180914164924","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180914103733","@atomist/sdm":"1.0.0-master.20180914101315","@atomist/sdm-core":"1.0.0-master.20180914103207","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"2734a0be9b938a28021352c936fe7ff5bf7d298a","_id":"@atomist/sdm-local@1.0.0-master.20180914164924","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-DBWm68EOi2GxGw1KYMgEe6n/qYRiSKxT7QTCjGEuqashesqGtbuKwLBcpcmZTt4gmtUbHZ1K0H3HnedtfrsCWw==","shasum":"1cf0f539f53a22dd46b6148470ea34110c40bdc6","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180914164924.tgz","fileCount":354,"unpackedSize":1268032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm+dBCRA9TVsSAnZWagAAMoMP/idRsfqIdd2JZ5Otcv4c\nRLhHi2gLH6OIuz+zUFbNvM0QnAhwDEi8f11QmKZotSmiEfZZHwjbodERU4GS\njZan4SV8mv/i5X542MaSgvANnILbODcvI7brZCgnmzgPloqybtDy90lz8mpF\n4qTYEzDKJk19jybTUHHbK1hcRcueWC6UfD1ohYUNAV8Y3CuHbNE7hl97jVrc\n2hC/iTdCqFXVZ7b7ELWbz25XYa7SBw2d3aaPz8Tdbx3D8v7Bcyrg4QiK46w6\nQWH8RtDkU7d1BOaoREU81xmt6q3R4Go+nCn3+/yMKyMhPcgWoK4ZMxx7Twex\nT6fgCVWtUNzkqz4X/JgSSZvY5Vk6L9wBKvvMFQoy8Oe7AmpZPqcBGhFEzgZi\n28YvZ29yve/DcwuqGjQic8Uc28q+jxerqvpPfxrvsH2ladWruR3F+UxKS62t\nvFBScQi07RexI3r94+fCbPptySoAeeFXBoBLXx1BNDYpP3gMTsH7kmy/Ghbi\nfUvBSZfWOady84nyWI5ZTmQ+sTpRws0ghciY+qTKl9FyFHtlM+aiuUF+kpub\nEU8L/TKEqtAR8lPzIVAWBUemWKoA1aRjTlnUpOb431hyUQfdVaslfYj4+mc8\np8F6StGRYtnGIFMWdd+Cb0ArMeow+Wx+xACdOn6BbqEblYSXSA3unPcLQnhP\nGxJs\r\n=Jgb6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5o0x1v6keTXRwI51ZrgUEuPpF05wbKebQ4r3i8Q48/AIgcPsrHPppLTnfWkByPHKigwqDh1cOzgJSOxmoWVvhXD0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180914164924_1536943936727_0.8066631599547269"},"_hasShrinkwrap":false},"1.0.0-master.20180914170214":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180914170214","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180914103733","@atomist/sdm":"1.0.0-master.20180914101315","@atomist/sdm-core":"1.0.0-master.20180914103207","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"4afc0ab824c12ff26449f15b94272ef5794fcacf","_id":"@atomist/sdm-local@1.0.0-master.20180914170214","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6nweA5LyeWJsfKowKMpckWPZqte1FhI4tkmuuZ8nILSUJFjizZ8BsAi4K+ve2SJOOwNf5eiRWR/Pfs+JqrCG4w==","shasum":"2c4cee338c8295c201ace36efd285a946a14709e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180914170214.tgz","fileCount":354,"unpackedSize":1268035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm+o1CRA9TVsSAnZWagAAKaoP/2ThGQcNAdVFWdkVqqKK\nNnmHHIxyhJvYlkJovKf4WhT6UtZb7lSfu1iVVMWs2aDzg1RmOFHsRKrZuHRK\nvFXXNOcBK/w84IDj68ASuamrYZ6tLonGDVOvvMIg9rQycIMcGniPuKae2NSi\nwsuGz3INl5qGN5Sr/68gaC3Il6Ew35qBu94D0PAVErNoHMAXrShTzjvjo7+o\nmNQDZ/8gqrxMpV2BGX5UsektojCyeDZEE7EDvgr+WoA5rFl56qJ8/PJHjfRC\nknxq15sgsnRdMju4oYdsJqlolXFbwSOmkXZg+U08eO2TUHLo3gfIxI0BGf1r\n0VsHIHSQnZUPOkCE10yntsG75gy7K03jhHtYCp6Yhccz5G9N4JzahGbHvagA\nwCLEJueXdvypu1oVlF5MT02XDlXHDmjpKi1nRG2MP3PYP/2XYQAi0pv3h+CY\nPJ9Zv+6iAeo3fOypxOm3bIJXKFlJlaHhW4k0mWHBjzSSyhetqLCLEVrbW+Uh\naaqEytMV1m4HV1floH3VaY0q13yL2KMYy1prvetWkkUfXZUJ5iR8pu8iSQSZ\n2SX8ZWHbueh5/Mc2ZZlp1QAoRNLBNBKzldKXKUwBFxHczJTdtnhYmJnQ/3JI\nvY0bEO3dIBYXE47T5Bxy0M/Zdiwg4LgRp/jEO0ruIfSmKQbuWpylRHmG6htz\nr4e1\r\n=UFjF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwiUuRoYQDvhfBeH4vly18A2YKvS9/BWzlQxoQeMHguAiAXK+YxsmIYAQBMPxkaqGJSqojZ/qn5BVEb/3SdobGuzQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180914170214_1536944692473_0.10993020640100304"},"_hasShrinkwrap":false},"1.0.0-master.20180914173910":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180914173910","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180914103733","@atomist/sdm":"1.0.0-master.20180914101315","@atomist/sdm-core":"1.0.0-master.20180914103207","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"4afc0ab824c12ff26449f15b94272ef5794fcacf","_id":"@atomist/sdm-local@1.0.0-master.20180914173910","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-M9uKSROaQM06laDN7bjw396C+5GMe7A3IMUiM5wVm1kkQRvYofQWUWY6uRaFUB12rXKKUU5stEcvdxGkfoN55g==","shasum":"8ec7937101d598f9754289018415221d5418a72d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180914173910.tgz","fileCount":354,"unpackedSize":1268035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm/LACRA9TVsSAnZWagAASUQP/0Ac5JTdWWZVZkdMEwxy\nRoMDKpKkigWQDgNqAsDswQ8YQm0ney3MUqraLbZGNnIVhqOZT6dQ1CZD6NNN\nqY+IuXT54mP7AP0ZIUPouUc+cwjh+JcUq2Bb++vmUIHIoDCNOz8z7yJcNy5p\nxdYuOKpNrdkEydHeW8LHON7MTu91GBdL4ZoDB4zxxv4Wv2Xiyj1h97AQ0cQA\nU44/TicJLz2mQ1seTHcTdh6jJNGyMH+RlHEGoeu+NkI2A7XJ2Pb9iUAlSMO9\n9tAzb9nhT0nkLJXpIQGQiJeFGL7kV0QtPFzTpcDB3+UXbbQrLqMZO4fgzpF0\n61NAqRJNCtvYim6U9jGvSfuZqGhpymKeEydO8GPR7REcvbaA6u1wjJ2+3R8D\nuvYm7ROppfqV4m/aPuSYftH/qrPL3NbmyuFX7ZAwME+jPs/MW8HviX9DKPCz\nRVCNDAuMkRkdG275ceOIYpyiztz/47csK1k/zxfKehO6IZ3EcdnJoMoMqphw\nQ6TXinSfHdIYjqiegrZuqWf8QMydaQNg2gbNbNAjDtvo0bfBh57B59lkrkwW\nZnIrwgdlmne4i8xc26SDrjvgYYQdNhBnaH79K/Ie6+p/e0UAAX+o94eL0G02\ntjDaccMXlcsRcdp2p6LZS7hWPCuxikoEQKni2Ho3VfxNRHIvnZfrjvmJdsG8\nRc0t\r\n=OedJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDHkn1u8w1pMK5h7kzqQqZRLj56p027u8/Fe+Yer6oHoAiEApEgCWQM9nUx5Dk+UoDrmP5ALxuGzktStHi9srliW0OM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180914173910_1536946879892_0.36572167928906363"},"_hasShrinkwrap":false},"1.0.0-master.20180914173832":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180914173832","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180914103733","@atomist/sdm":"1.0.0-master.20180914101315","@atomist/sdm-core":"1.0.0-master.20180914103207","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"4afc0ab824c12ff26449f15b94272ef5794fcacf","_id":"@atomist/sdm-local@1.0.0-master.20180914173832","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Yi88rJbXElfMTJalOaNreh7QxFdy/Hezsci94UxPDF+TKSVBGqSIZBWnULwzNa75Q5RWg3/ls+idj33aVyk94A==","shasum":"32beddd2100a0143dd2fedabc504fe2325160061","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180914173832.tgz","fileCount":354,"unpackedSize":1268035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm/LuCRA9TVsSAnZWagAAOX8P/jvDU9+nkbCUzHHpnMoc\n8tmINjGR+l24YGF8BhkGn3bx1WkplRXo6MJStN/ctEKDOHu9i+UQu167EdfV\n15+FYXhZT5GBxYsdqjtNKVpc4dVGyqqiRYx/T6CLUR+6p25j42R2lbMZ1nUK\nTZPob+6f3CY/PwrcGcqMBPjQhd0LZE0jQpMMn2ysgJXrGZ1ZU4q4eMFHbG4k\n8HaqMlO8AGsB8Zp9zllurlRxPvazW8rrPE88uKq+4tSdGWQDxWCrVWMI7pWf\nA+TeLiio899+Zsxh2CW2BZO4ZUutZskJjXEUvxNsPC9kkArbQ7mKDJw7wp0i\nA5NOb+4TobLbLDN+2Na0bopT9fm5YFXtYI6Ps+GTMUCW2cHS+l5HUyM/pAsZ\nX4M9UFHtKDwHiCL/569j4mSqoJQLbljO+qgUNZ4wss3tttMxUqJxAM9QbHD0\n3jDCni1feXNS2Br/yqjYUk06dCHQviR0dfa1bjXOR5Magpyr5BemwBfuz7tu\nFD76krmWWkcmcGEpgyhQa1JLI4HBzIikcnCYd2Eynd7WdNs79Na8iqPmd7uG\ntwQZDNLkEinb1xw9FUbEsXZh+0LJY+LYP2sYxkgaFO1DWqeQgbuRrRIof02F\nmk7YX3s61dKAG9BjovsCVke1+G9iNQCr8TjIUnG1nyeeH7X5jcyICbwOCOsI\nkkqC\r\n=HyvW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCn9/fgHJHLJ1+pdTL9KCI0z6kZZNu739GtiZIxHYG9zwIhAMLaQ3HX0HnbTVkqACEcpIFSvtcCoiQhtO+tf8Cp6+ka"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180914173832_1536946926233_0.2403604414818199"},"_hasShrinkwrap":false},"1.0.0-atomist-update-branch-master-1536998477018.20180915080123":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-branch-master-1536998477018.20180915080123","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180915075522","@atomist/sdm":"1.0.0-master.20180915075111","@atomist/sdm-core":"1.0.0-master.20180915075233","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"72fdd541f36801f1bb7e9208a9f465ecf8b420c6","_id":"@atomist/sdm-local@1.0.0-atomist-update-branch-master-1536998477018.20180915080123","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-VP5c2JolWTUQBhNjQuf2lRAFgk3c1WnN8gQvC8lEIK7f/V81+O4TW1Ser6EUOVBgztlnLBHRQz917j58Y7y+zQ==","shasum":"ade7ecee3925efb100b86e8b032bb03707f1f7b7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-branch-master-1536998477018.20180915080123.tgz","fileCount":354,"unpackedSize":1268071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnLzrCRA9TVsSAnZWagAAuVkP/iJ6i91Tm11j00kP2Rmj\naUedfVDlp8pWHQj740LvsJytERFqcFXXFLkLcEpw+DQ0Xvb0zb53pqh4lQgc\njcAkIktvFHUqqbUnrM/8xuIkbAAxs1pzqmSsFw07JJLRmDO6Qrs7qL2eDriC\nJZukoXi5SQyAvb80j1sTj1i9ma1TXwFGD2V+9CPrSvkjxs9gfr8m/YWPGyjF\n9KtumBT7a3jESFOPuMR9ejSwatl50ym0n3gD2QCBHjMepppW9uzIInzES2Pl\nFzXLshjs8L1vjvTfXbUv/jvfHGlVAdRmjhBgonF6WPDPHhuphJ5wRxdX/ZAD\nCHNJxPflH7cNHUuuHA42z+CMyPWWgxIqC6ggNc25zx2IZ8bzAfLtX310npII\nfLhTwEWLZ76Ul6YtqNMDy2gAkqI70XmRtMmo0MbDBLRODYJyuCa50pUB3Qgv\ntznXDkZvJbMz+MpAOHjV9DavGmGomCFv01VUkl5uY80ZgQklIXmz1W4AP4P6\nD97+747b4E8Rbbf+ajaVKml6z9kTWF1B91T2k7Y3A6tR8JdXpZHPiXBsO+ex\nbrNWIaMrvYTS97AHn5/r+nr/ZLJzEefvMqEToUP4SvYPfoNkMSFUGZGjGrQc\nmG4fvSNTe1/Qtxhtd7WD62gYPRft5z+xhmrf8TNRy3RVAYuYWA1TB5qhrPjB\nqFyB\r\n=ILyN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXT63FTFBcpkKdTQSEHeGbaRdzGN2CQklqnjxF58pjyAiB0ynQNcI5SrbkZzvOOdIcwNjrDNvLK/DLc1sYDQ/paRA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-branch-master-1536998477018.20180915080123_1536998634568_0.6077750453112893"},"_hasShrinkwrap":false},"1.0.0-master.20180915080512":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180915080512","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180915075522","@atomist/sdm":"1.0.0-master.20180915075111","@atomist/sdm-core":"1.0.0-master.20180915075233","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"2a38c592ab88e77182340725f0e68ef1cfaf34ca","_id":"@atomist/sdm-local@1.0.0-master.20180915080512","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0/ViPJlQHfVnvzkMp8ZLE9mNNa0t0lcE/p16qqtQlYPXEQ4AkP1fCogfOhRG6d3OJTlYK7ZPvRNLI73kp416tQ==","shasum":"cebd427e79ec4947d596bb514060f5ec132d07a9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180915080512.tgz","fileCount":354,"unpackedSize":1269461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnL3MCRA9TVsSAnZWagAAEk0P/0ybvKJKpLE+IQJgbPNA\nXHTNyN8O8m9w5PnsoQLvdxWKRKwe/mV8YrY9mpSZNp0V+ACyFcq26POGGmCq\n/y3C4kJIc9HPyNpxeQybPOX89wA7dobyLMyZdxEDypZZjPOdDQRlQaByfhDC\nzV+Cj+rkv3EQcHUpE5AS1TMwZaad0rJlVX66xVdFijVtY4/S0YYh9lJalsMO\n9dRWqR4PYWpgPz28vKReXNyQIdHf37cOC/zp/1BZjsjnNxHTccZv6RPxuRRu\niLvSPajo0JrzqPzru4OAq1wVvjIyDW6nS8FVBnBts49dPVhpDRVhQtoVLU33\nJehrmg2AKGe4YrLorgYtA57dBtyiUbZCiSplVrRVzcPX5zfoe+mpHcTP+CJA\nQcWxF2w3W++eHfEIbjZBVdV/ZV0ZFpNKmFpyP9rbuvaBx+A4C0BZZ2BD85GQ\ncwjyiKlDw7oJkMmgp5F5Z82uhpNxAFwurM5cdmUFGlzbW609eLYLkboURhX3\nI7HN35LmE05Lo/bX9aFfuhyn5bP/N3KaXDYwh/9YblE+peooRJcV66sLXf3a\nUJVwmVpQZ/dt1So/Fx0ywl5/7VZ0Lkw3lysi6b3LDQvpnUr2EVhPY3ZTF4Uw\nyaKmcy7RaWAPRGyVjAAUjFLK9h0xfnPDCR2TS8nOCYOrQAyZqa2Qb4mkF+/2\nQC6X\r\n=zOeo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXrFCy8v2EJ+oj7gFwyXEiwEES2ZeiANbaHDR3yRQKHAIgDa4bOKaoy5Ol+gUIOFsnrfRM5/lQoW5/SrmJkrek1GA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180915080512_1536998859825_0.9622870774833681"},"_hasShrinkwrap":false},"1.0.0-master.20180915155756":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180915155756","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-master.20180829162516","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180915075522","@atomist/sdm":"1.0.0-master.20180915075111","@atomist/sdm-core":"1.0.0-master.20180915075233","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"8c19124cd5f1c032ddd47fb20f20cb5a829e2d64","_id":"@atomist/sdm-local@1.0.0-master.20180915155756","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-F9ZstVzYpFbgoUT3FbpKj7TM+pbC/tNhaIMxh4cBAtXRmIibm3WYYJ2QkDxNhA8fnwStBxkKykBYm/FQgbrZ7g==","shasum":"4f3b7788b043c4dad09d86e9e09ed2bb3c288c4c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180915155756.tgz","fileCount":354,"unpackedSize":1269194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnSyICRA9TVsSAnZWagAAf8wP/j2JBdtu5BxaLRoYBJ3O\nfPnWGEV8HvHrmYzyRmpWj8h0SVbyFnRTwha3xbf+NwZE7mR+MlBqHdBM0olm\nuvQ3YwQB7VMaVPEeEg7JLJO1KVF8/Ah3FsbVxxUNtfdXOm9LCluBTsrRBnkE\n6YCT+YRtRqFWyoWoCyoWxHIdGSOeF7oOau2iuqm3YDewJ/Gy0ED5I3ZoClkj\nXEf5H+zdJkMShbK/LsWexFDIKZGKAjtBDbkuA8tZLXcTyqODJKN0TthuUkHT\nA1evvIKt4aO9zP2g3Z4KuHiki2IaFG4Aa4I0yJqlffDdyrzqH2bzInXO7qiB\nweoQDEzQzSR7izxdaZOx7/rugtIIRr6FItWzmujoNkLsgaCWWTXtfdN7eTiK\nKl8ZKq5SySIhpYlz/QPqa87OX03X8sA0HvNsGX3Tqgy5k/e+s6gmtR5fdQLY\ndeaLVcwxGgdJA1AgIV5jYSxljX8SYHTGFKwnI32va0f+SSwBmCTZabAdL3ZC\nfhZyA6WrnK4NP8+zPKQSmZFLn6HrVOCFC7j+LUBj610PDLzeDJIRo6MNmWaH\noCIW+TSZovXdNcpKx8FkI88zvtMaTLEgpDheB0jgZR9YMEppmBVJcB4nJohD\nVchlVjoQQMKsuvY3+bDlAwsvXzrnB2e7zWhdXceRTYW3byYUR9n/PN46mezp\nFS7Z\r\n=GIPB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH3G+gpx+UgG/jKvk6D1aYQRrmE+YEdg0k8Ho+s47yP4CIAjKZybQ0wPlVLZ8YzYHc//fOOgLiALl3RI1VOLGRTgc"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180915155756_1537027207323_0.8208442023742453"},"_hasShrinkwrap":false},"1.0.0-atomist-update-1.0.0-M.4-1537123170688.20180916183939":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-1.0.0-M.4-1537123170688.20180916183939","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"a99ebbc704c9329d66548ceda55f45433047d156","_id":"@atomist/sdm-local@1.0.0-atomist-update-1.0.0-M.4-1537123170688.20180916183939","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-iEN8677yra8MWNqzsxjAg9jr/1z6gddCGqEg4OHtIlFcybKJWT4Op/WNtk2d47Aiv1H1fX/F0IylbyzJFI621A==","shasum":"84731d084c27e58390ab0ca89fd96d3303645110","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-1.0.0-M.4-1537123170688.20180916183939.tgz","fileCount":354,"unpackedSize":1269263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnqQMCRA9TVsSAnZWagAAC7kP/3sHh5s1U0bxG+v1KcnV\nHfUdRzlaOqynaBCTN1nvc/0fwOULO5EssYotlhx57UmqA6uVhi1s13aRs00z\n4oT9TPDAGCLRIoMkLCyxQrpPy3zrEKRclYiPDj2zrlaCMNxT0Qaeicw6r/AM\n2nWnECYL9q68pkVhfGAduS6eTs/k1YRZOmll121fzezwZ5gu2xJMVpH7cNeJ\nUYfdXdRp6ob9zqHFmk/JEwsyHJR7D4fXb3qotVq9Fc1PI8gq0C4c21fZg7L9\nlxdEB99ra18fu01iEVb++K6eDW9CGGXP3+1qmtBxSe1GrBNiyHuKjF7g0JH7\nZ9YOP57xWdVl+ZXyBIcdvtpj4ve/NMmuFtmDnEa3bbC17m+DgF7AdlcCBNLQ\nbbL7gVmei5myC1HKI/TeuW2rRMRqVKx1t/PHOzrAHYr27quiuP6Z6JJEyrHR\nx58UAM4rX4YPiOYHGOvqi2/bevAIkjMf6L/34qfdx6tuDvdZcaco/4Wma2kc\nIu/8K4GFKhC22iB3qDwAY15azTDqFc/CkI97uQp+vy0oKmjWyN64kPm6hr8b\nhlaTL6bjqedVeq2PQmSeFbqymyhUt+Z6APmowjtZ6zP4ocvqpiS19SEaxBDi\nVPLdE+XoRVQgWHve6RiLaPLFSjtG7UFNP0JoxpDd+cdiP1e7yuPHoWUdw4mL\nm4UQ\r\n=U9rN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH+8/GBHf7w4rwZPpbxyOQzDla0+dAYy/b3xwnWO/MS2AiA5nLVvxduedEEWpyF2aWmoBVPOiH02Wbyf4sOr6YC+Pw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-1.0.0-M.4-1537123170688.20180916183939_1537123339766_0.8536837624018725"},"_hasShrinkwrap":false},"1.0.0-master.20180916184335":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180916184335","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"c17a08c1c16e50bc0d5aa9ba4fba7a922499a95c","_id":"@atomist/sdm-local@1.0.0-master.20180916184335","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-NBYMh6wo3fg+rBXCKErMqta/duidQzRdI8kFp1/32ZTnOSl1Mo7erqfWvezWmnkO+U3v7gHbM0AEXFbwhFjYZA==","shasum":"22e2c11467f687a6227279b48c897ba4be9a29b7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180916184335.tgz","fileCount":354,"unpackedSize":1269140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnqTwCRA9TVsSAnZWagAAtzUP/2RWNKsBbecH6felJ5Jr\n2ROzpZgFTRXU8J58Km3v1Cx52C9xLhdN85XFKBenkvHCXduQRYSPBxhXQiNp\ntb/zhf2e3ppXSrNZLK16xHAPhE6qIL4EbUhoIpaB1eVCUDu8Nc7qb9INNXek\nBKHi1M2vd78hcO74vFqTJ/P9pStP3P36oYuzrtv5z4Yf97IZ6XfK6UEWuVIa\nEqhWfpJTSRZCh+0zfrlx89hp8x/fCAJeRunv7cpprGe6PLdBHIj3tXR7S3n0\nHRBGXK0h6C731z4Bo2tF4y5eCZitJdrO8b9dVin6Q96SxoKxmSjh+4tiTqYe\nVSzbNTsHkVK4w+5dtFRHCohiVJEP920MpoaWAzNdHS2vIsRHvwUTPBve6wfm\nfkyLiokUzEkhMZFmbG8TzBXUzfUJar0B4R+DzjQNlMZDJlYtsfI/rQJ8jajo\nwskGrFA162ILXgSnXjClMwfxcImfgkRCj7WMNVQydhTNp+AJ2mxRJ013JtTT\nHBj96HeVWQrKQsoyKTMJErfzEdlkIn6N8uci8mnzdemXjHnNcWqAj46oPgMy\n582tdvNwVdZ9LR9Z9ROVKd7Tz2gbPi6oypnhfb9StMJfBM2QDMOE/DWowJTd\nNZ6kJDG7nl6Vcg6OzOFOmBv++N88998D2uuQDPAT5ZwQwVtYq6/NswimCzES\nWQvz\r\n=bX3r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCaCGf7s7zuOE/a8CRvn82SNf5FrYrHaVIooTcW8O4rAIgYYWzaK9mWiONDZFeyslOaGFRhFORUeqvrEHhN1w+wm4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180916184335_1537123568130_0.23701955462749114"},"_hasShrinkwrap":false},"1.0.0-atomist-update-1.0.0-1537123544823.20180916184551":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-1.0.0-1537123544823.20180916184551","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"c2f56a5705575d499c058e7b7ab5cd9a802db6fd","_id":"@atomist/sdm-local@1.0.0-atomist-update-1.0.0-1537123544823.20180916184551","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-xbPpu5mlFA7EYvkajBovQcTl/Oze9Xr6UJ6jBFrU7Gza0FpWR3wmtyEo12syUizNAYpwG8Ik74iAiyzJqWrfiA==","shasum":"dffab45be6b22501b83bd12fc56c03df288cc378","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-1.0.0-1537123544823.20180916184551.tgz","fileCount":354,"unpackedSize":1269146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnqV2CRA9TVsSAnZWagAA0zMP/1NvDPHFqFgmwKXPEy3e\nvxSsQA3U05XdKtgBCvv9zXk/Sw4xQ+Hj0PCmFIfwJcAGU3CWzzxqyWdmcg6L\ng32pMq0fEvOaptVh7eYLCWQuQXcn1rAVvs07LEMGQ8Xpmf2kL1S4Koww9Pnl\nP8zkBhEy4cRabbx+QvZ0yalF8RKilEz+0Vb0KYictB2UyEKx9FFN3ko4wEQG\no7ee76KaooLehBlI7svRhopqQ8Tlx2On/CskgecI4ZiJnhugk6E++wfSK1B0\ngrFux+ukeoMYPZ54kI3sMRgO3u31NUJqyrF9LyfNbqeT4Ii6oy8U3jaS6f7q\nsFFb/M+5J9WdszaUD9DpAQ5ijF7Gmb6A5JaNxxsGnRH9HLk/YdjDmJjMopV7\n7BdMw0NTZULIOm27ARRsfegtK5WSzIQhi/3Hf1UHqgTCILxErGZHhxKmhCs7\npeFJzjyaajI4Oit3WYvIVNnAuzF4PuIDpfDUKAhAJZjZeX3UhtVAfLhJFlxL\nOohR1FDzWIvQ3G443txuwS978OzAcouaT5KTuATXmpR57aCDo39rU19obgus\nNykhgcaqJypN/BlrGGoQIaID9gqDOiyaW3t93FC7sI57yyA4HkdF1K0lTcmo\nXzhg+VHPjXeZmcCFhi9C/fNJs4ISnv9Z9m7eduvdFNEDZH5dFfdhEnm6Y2TL\nVve3\r\n=KmXA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1xrrXp6ZrgBveKXXZw90Q4VAEqXv/WlFpub6QpWxlbAiEAmllK8X9SqGLWTPhVz0L7J6ieJVkzETGWtcZZPZh7WTU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-1.0.0-1537123544823.20180916184551_1537123702225_0.12151527984644228"},"_hasShrinkwrap":false},"1.0.0-master.20180916184937":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180916184937","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"29d83858e3883bc1fa751e764ca568ca8186db34","_id":"@atomist/sdm-local@1.0.0-master.20180916184937","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-yb8ie9Cqbf3Ysb9lY2kIb6Skxr4kGuS9tVrsyGcglP95HedklCYjJ17F0Lb/5eG2OrtZDPjkq591PxUNr5AHHA==","shasum":"fff9e5a0873b4fb7d09e802061163d2e29ef6372","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180916184937.tgz","fileCount":354,"unpackedSize":1268965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnqZXCRA9TVsSAnZWagAAfagQAKOIY+GFjgryKZ5mmojN\nQ4SOrlGYdRg9hKJBzTpYQ77xBleSV2aswimpsU94seD4V2vjHgYtuELCGXxz\nvyg8h/NtemLXQZGJnqknYwDXbBH2qe61d+vwbc81eQ3g8hm6j7lQw9z+bh2D\nqUhHy1ECaJLFM4ug/NmtIkZh4PKbewewujhnkzxlc57bRRwbgKEuZOFilaIx\n5RUI3ZTX+G5S5zDnf92Yqyv2UhQBHdbdry///GmM01ksnofElIscW5KLsmQv\np2B0Pf0ty6hrDN7ABmifMqeXPfYTJsVBjnAYhNyY2i78i3UA/YwH6gkGCcoK\niX5nx0i/pSGkr57aHQJSoH4N4xj2GtaRGqTuLUKahCrICuHtVCEW57M4NGt9\npVaW3js/wYsLhoraQjhuMQoBOx39fxVkppr1kOsOwCFopDRBMK0Vn5Dobxg5\nPo0RoK6raGRt9ttfbvlUdn0nz3gilFD596gr6a6YiW2iwujr5AIySk9AN47N\nUEM+15vGWfSD8/wGjaUb9d4MMJEO40lu65dApGUn8oVCF9f2yf5vJ0IbTPZD\nMMt++JhU2AAe2xNaaP9G/Sr0xItryY9+mGwsRvCM1htsJCpGWIg38CeEVcCQ\nVsrBRpQps8tSrmWtRMnWJjFx34vxyAKHxk878zMk+rwXQrjSIMjvDwFtZILw\n6KRw\r\n=h3k7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxd2A3efiVFnPQ55UTtdyLKGu4lY6nrIVCwaTYmSAGnQIgV5J+gbWUeRVQteEv4zh2DJllRbO4VVWrZdyFxoIkogs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180916184937_1537123926495_0.001074914643072633"},"_hasShrinkwrap":false},"1.0.0-M.4":{"name":"@atomist/sdm-local","version":"1.0.0-M.4","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"gitHead":"29d83858e3883bc1fa751e764ca568ca8186db34","_id":"@atomist/sdm-local@1.0.0-M.4","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-1e+xFsyhhbHdRPa1w7bmoAyCj78mIGozq1O2j7NkzVdBhhYaw46/v5okMebYDAh5BktmvVVcvfgsmpd5/T/AMQ==","shasum":"871d0e960dc742c3b829b75ab43a325f4a4ffe09","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-M.4.tgz","fileCount":354,"unpackedSize":1268947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnqeACRA9TVsSAnZWagAAVUwP/2ilLNFzpAkTiSTF787F\nwV5AhFe3zei27dmR9U3N1WWkfXEVGRCN36CQCli29s7OF8QntJf0a8xt3lZ4\nMDBPIrOVoybfgBPtYfEbz8NJLEm63q/hYEB1ms6HJrRYQ1qTvZfEJDybSi0y\nGvHRpl3ECMqTAVEB0JgmHkD1M4cd43A56Aio1E82LTsalT4A8KQtds7Tk5y7\nsyrMxFIb6YXNmT2IdYsAbmxBK1l74jBdgReE8CgEUElGG2DIlrY4MRdW3L8A\nJpHbz+BR2JBjL/n0KSHiZkU4cz14Bqg5zE7K0Xfb65sP/mCOzkZb5F2rsPM+\nxt5IrOQXexN0J5sSHeECseKRaMnuV9eskbQBAbuTttMTJ0xIGWk9Usd92UaZ\nmGtW4rxiVFzZarEqkwMbj/kCxzpH6sRLYAH8ovPRznAFb0fKUv6JLqxlg+J8\ncO11NpsbgvCr8OHiJey+7pLa7bObzP4TX33yPUNH4g2dfRbN0T71QR+REa4E\ngRCJm8UWUv2fBx72OpICJ+BT2P/HYLFmbp/UVDnce4BKgRBiHp9C0YtT9fiA\nDdMvwu+d0pdGIq80aJDMvC7fvf4oEDF2oo3eADiuHXzjOnf1q662vxo99qQK\niiVvKkM5uzHaWyzFQd0h2OBSdPRA9Uizbs+XLtrnIgvjV8b6fYq81ud4oNm7\nonFW\r\n=4Qie\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFgxDtPKJvCODGVdb1b9jFo4x6onpKrvn1oP+GlGisTuAiAb2XdixYsW/fp67uqP5ua3tpLxuv3H/jQC0l6LeCojoA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-M.4_1537124223570_0.5172847987142091"},"_hasShrinkwrap":false},"1.0.0-win32-hooks-194.20180917215626":{"name":"@atomist/sdm-local","version":"1.0.0-win32-hooks-194.20180917215626","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"a6e2ee2e0361c54c37730d07e03b01081cb2b55d","_id":"@atomist/sdm-local@1.0.0-win32-hooks-194.20180917215626","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-OJAiiV3ruSev1sgn7yZY5lexfk/o7jjluHnnryGzoorBryUPpoYeJMSBI742lgLFKtVjvmhHgQjLhCNHg9qutw==","shasum":"0af0cf073f50bf486978e8cd6c7d9665bde5b5ad","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-win32-hooks-194.20180917215626.tgz","fileCount":354,"unpackedSize":1269065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboCOYCRA9TVsSAnZWagAAGwEP/i9GXuQTvAmeBIE4od8h\n7Vxc5VyD12kGhC5XvCmC6Bx54m1bBkxcTmp6Fe08bEWQZMKTXv6um8M1HIQs\nsLCCYZ+tQ/A600R0qPVkdEF113WlyuM9o/pug0FtusyOUoUjjSQwCgm9jI7S\nxlEnfgCRk6WHLE/RvkjwOIu6UbLtLiEUiSNXLAeqV4sqbnJQpsH4McSRLvvP\ncyqBzq9IH3GKjoGUgch+BmAo91DhwhogF+5Eou1xonIjIx3PDEGkG9pJ48cZ\nchBhbtVCdWg6Xf8APqM7knWsZ+F8yhqkTFApiXVkVHuIXAm8PAiPqxgcfgrt\n//LBwPIVUSXX6pEADhEu/DZOQGou7D27jvd8GssyygjQjImSEM8S3i5CG8ay\nL+SqBdrVA71VFq288ltSqMv/QAqCf7mudoNin/lmrSlTfizFHd3s4/86kXgR\n3+QWFBForHb/hoBPA2mq6qlLIE1PI04iiEaVTzatoY2w4yfiDnHou1m/FDTg\n+ccyMWdlM9vtBUvunZ3r0sD+H0QT+xaRA10ywFspv49K8x1esU4D8qFpqsdm\nV/vCZt2OoyL1i4qEm2NAibX38ojizwyGJYtG1VEFfn/JISD0OlrcWbZqFSCj\nzhPrD8qIpsuSJ1zOs5DCGZfml7F+O//5Gf5GxjvSowm4c4TIXO+fI4UImit+\nUVql\r\n=1CDY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCI2RYTK76urtSp9H2i3cyPHilIzwLs8h1VDd28ek03WAIgUs33jwOdKPO13ZYsZR+cpvA5Ah71og7W4Zkd5ALRCp4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-win32-hooks-194.20180917215626_1537221527621_0.5596686847133678"},"_hasShrinkwrap":false},"1.0.0-win32-hooks-194.20180918140319":{"name":"@atomist/sdm-local","version":"1.0.0-win32-hooks-194.20180918140319","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"fd0de45f72a3fb5336c1cd918746923c32c0d9b6","_id":"@atomist/sdm-local@1.0.0-win32-hooks-194.20180918140319","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8YZbufwnr6GK+eUJHow2w8WFQrxehaS7dQAkKk2ecKPiND2wCPMRK/Y2WBI9FtJKJHYXtq8mtDWro3x9r7I6JQ==","shasum":"1ae2bbab0ee4d3202a71c8cc07432c81a9837eb3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-win32-hooks-194.20180918140319.tgz","fileCount":354,"unpackedSize":1269314,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboQY/CRA9TVsSAnZWagAAvHIQAI+uOahUgGjwQNRv8b25\n72XrGjPrW1KDcnYsQgSng8i9arI9MQsPRTC0/ZsK3S2L07s8unHPg8mpenDC\nf9ha0q0uuT5sty6jj1MdU2T53nIdhfcKncQSKkOSAqDF9N2Icrn6oZxgl94c\nkCBru3ymkKZKrMSego4OCEtT0o9QMOie35W2BrvNwudNtgEFcw0CYSZ92j8u\nHF860brpsxSNBffXnmr45IO19jtsx6MMOum4XyS2jtTXeJLRp2cx+pkDGsH0\npm1w7ldkaqeiWRVcNGXqgPDdYJbWZPKi69V3WQCdtQJvXcJLZXaTUf8+eUOx\n/KTmzdeWRHg3km+0PZShg+jLczIsWU5NjbhDM7tWeRDfJChCPxQ41ZYJ7Xt1\nGdw2YgWGlrOfEiOIzFhtQ8cKOqlSl0ZBLe+6hfu4TSQldStd4s7UVDCjEwKx\njzPmvdUH+wmJKVRtbCnAhKk3nl85Hi5izYFEMOrOCiIWshMLbzUs/dGwARFb\nS4fJRb/NbKU7yC0pMAgAjvLsfp/8PWoN2HyrH6iZsXiMSr9OksO+MiBNUnv+\nbXyiV0sL/j1A9W/UpfY/IBPRaP4FOxYX+i/vFCdLQoo2ZMZF5Gl14fMfypJc\nCkH0Y7kWjXiq3rFiIa+iV1/a4EJ4knOE5oxj7g9af6D/MVfWO9I4VagxQk6H\n8N+g\r\n=ajDl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC57GYUjMRoHthFgwAJYHN9ATLlLLjlUozkMGRgylQrEQIgDrRjjX6vsnG5fmBuc7zFTCLKowjEKhwbowY5ASeNNko="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-win32-hooks-194.20180918140319_1537279550208_0.44548229190957755"},"_hasShrinkwrap":false},"1.0.0-master.20180918140708":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180918140708","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"2043e1f599b48915073ff370a837d9d799960fe6","_id":"@atomist/sdm-local@1.0.0-master.20180918140708","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-E2ZgmcAvOlV1N9b82XQW6GXlvXJAuJI8e/exN5KczLB+w/0c5F/rCvDm88idyNv258seBf492b+fUUr/GHZvvg==","shasum":"0694327974cff5937105c61458cd645f9365cc12","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180918140708.tgz","fileCount":354,"unpackedSize":1269305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboQdUCRA9TVsSAnZWagAArsQP/0U/xQha9PHc22K6Xexm\nGumID38UaQ2Fd7c/jWFJrShT0EefzXJdV+/YnhpDfjLW77aYOisSL4RKIcHX\nPR5VR00fkOraqJ8j4lUsamLu2ANdSdxyy6g7CrlQXSAMslKMptsietnSNkaj\nQRHiyrb70NAdzwQ7k5wW3cljXp0Jntuvdf3FzO3p1+RgZwMaeowgepTdjCQS\npygv7b9ePWG4qI1EM9uSbsUpS9HPathylab6C/Mx0Rc9LP5XBVkPWWzdUJ9J\n8EZix3Tasr/50/+aRjFoerIFJ7nf7iU3ONzI41Opwu1ylITG5lNHxdgkX9vL\nTLGyaoJ1triBvSHd+6r8aHRH4QzYhgwlMf5OBjBQdtTSRyuwk6fJXI0AfJnw\nlLju6i1I2dCjN0E1kEoJq4mcFwP002UPCZDr0DJMjKV4ZPuqOcpkvLUm4Nnw\n5GXEy/iAl6S/RnawSvhv2l8v2NuxBRuohdC6D556TQ87vddbB7RmncJ7bR2u\nA5mSlCHtK3GKQf9zZSWIq0l6dcG7Pad3w0j0k6UrHsf7szwFILgfipa2y8kT\nFusCHAwnlEX1qXTwvtj3oTIpmYza/is1JbIYaFOZtp1ZwOB86lnQn/h9Y943\n0SUpQqk8n+PUZ3g1B9C4ivDmR9C1/SOvHaPMZhRseuxlL7zajcme0nM1sgPB\n5U8h\r\n=jh24\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKDRURb0wpmKxp9nyiJJpcIg/Igl/9fSGeE4oW3Zk0SwIhANiQX9y8+EfCkiS7qBmQZpwUuNSze2DMFnN9jq1jyklY"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180918140708_1537279817943_0.36829005824554706"},"_hasShrinkwrap":false},"1.0.0-win32-atomist-dir-195.20180918161741":{"name":"@atomist/sdm-local","version":"1.0.0-win32-atomist-dir-195.20180918161741","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"19644544e3d80ffd29987617cf9896fb1a6f8fed","_id":"@atomist/sdm-local@1.0.0-win32-atomist-dir-195.20180918161741","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-VOeyUw8e+iRB/unfDHMDVIzpkVPrEToF5CpYKClCVhZ7ZYJ4MzsOMIVM1TW7pYPRk1K0j8/PvEb0RhzGUZodBg==","shasum":"71bd53ca55f413d690f65ed1025aa615139ddba6","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-win32-atomist-dir-195.20180918161741.tgz","fileCount":354,"unpackedSize":1269812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboSXACRA9TVsSAnZWagAApmUQAJxnOckrplgOBqEUsB4P\nAbmPe6Z3i/l3puHxsKpz+RZ7FJ6p75oSmvxlgOpnnEOIotfNDmdD0uIb/JkJ\ncdD7snNLqv8KG4T3PLrWsnGU3EzLxda+ylm35XF/FJZ387c0tTgWTUe8++08\neJDkHvYoutK0Xq6lSASPp0vmOlMyE/FLcEwPoysc+wS3YUwUms/rbZVWpgma\n1eZkb6nr0AceRlFCzmDOZvD5mNrmcydWmj+383Rc18C2FiK/rLcF2wPj6aGh\n/M74eyqbjlAkbAGlcsITODVpGl+8euhwR83cnQ3I7BQLsjg0QqV9JMMKrncH\nyyKthN1R1RmEBxxjgBSu3Jk0ZP71TPZL9VSj1D3+BgwIIe5TsomEJHFkayrk\nkfjXXVQohmTiDGtTgZUEPGfsFgIPhk6rKaHB17uZUlQcFKRBwX/QOY7brHzp\nNNwu4lQYu+IBAQfH6mKl//yPYYvZquA75/mo+b3NS6qGRxW8t+NP3/WrrGl+\naUMvu808Kn4YMYjX6bv+gIX/lkxmCTqrRUDDj9KZpEnEGY4WpF/5JyrbBLxU\naFWqsU3SmMMQqiAl6bRwlmUVZYww5GLndMTZB9ItMt94/IUacChxWiQVGt/C\nt9oShAPqNesWlxvZCZetD9re+UPPODK8e9Hd5znlFTYYLdPnRxXnHOqQ2zGC\n6o+H\r\n=Hf03\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDAI2F3/t5U9+It5fYa7z+PSxxqCRCpS+vyhGsqQS5QGAiEAp9v3iFr32JcGIkWFSlapkT6lz9QJR0m1f58OEriYOQ4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-win32-atomist-dir-195.20180918161741_1537287615379_0.9935769745327212"},"_hasShrinkwrap":false},"1.0.0-master.20180919150518":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180919150518","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"main":"./index.js","types":"./index.d.ts","keywords":["atomist","automation","sdm","local"],"homepage":"https://github.com/atomist/sdm-local#readme","bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2","typescript-formatter":"^7.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","fmt":"tsfmt --replace","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*.test.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.0.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"3b41121fca677061fc1eb963119bf8c33b712afa","_id":"@atomist/sdm-local@1.0.0-master.20180919150518","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-CxLVNBW6VQo2/KoM6NkF8zb5PdUL2kht1rcsYGwILNEgn9MPVFGCCxc5HTe22psvBDgUERYf6QA6cs0HhDxVRg==","shasum":"af96a2ccad4a5628e7f8b61047bb2313ab138032","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180919150518.tgz","fileCount":354,"unpackedSize":1268987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbomZVCRA9TVsSAnZWagAAmiEP/2prNDULmpGOQY+BB8sP\nWg4XbetGmnZieXSfoh7ArjQNZhnXWkEXTWz5INqsOQZAOZghawr1yjx3fm9n\n2Z8M78Lb89VyXcKhm9cJIYOxuUN5xKdOutpHdEv+/w4oviav/NfwsAO1shOq\nj0kHRD1uiYTfmFSUuXXiHpD/hl4O2rN1nRQRI//UpVpQzU+cL9eLPkGkHXZY\nGrgGw/fFSBz+cCHYTt7nTBB7O70cUZxJLW78ylGEt+Trb+MMFIY5z2WhgK70\nOY/6Ggf7aQ5jetkB3w6A3G35A/P7PsjooQRHPk/cATAP1jHMYvmO5/sxyCvm\nWdX3W3jdm8hc/G5l/kArdVzFqOHXYL6QILxKW5dv4AXPPV0Mq8WR2aBTNglW\nAAI2kjBQQy4gkqK1ibNEn2f3dI5QdunEhmlwCDqMlAauvBnZ7uV674Lke/Iw\n6seeHlJ++0DmxbqW7S7jIYZhdTRQugpDPciL91Y0Irp+/XXPZ71GpbfdGirU\n2wl7aQZRZ7ACV8ylqAucQGwNS5LD3vTrnIwdtoTIFs58nkMksYYifirZtXhY\nv5eAFHgZ0wB6UJZCiZYXGibOqaYmtcPjB81UUNX9KfEVsMZcpM8e7n4QR79j\nAg1j8qnHAlQaPkxfXrTq9JHbn/Fq7e+N04g/A1+xE+beutblU+DwqT6Gvr0s\n6lPT\r\n=ANLu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiYuC5OF/L9grnrJhoO/HzoZgVb9PjLYlhNqUr6UnOjAIgeLa6gFovuezVhXSenYLqeNczumgwU+D09yt8cjTY590="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180919150518_1537369684955_0.1477241656768873"},"_hasShrinkwrap":false},"1.0.0-win32-atomist-dir-195.20180919152223":{"name":"@atomist/sdm-local","version":"1.0.0-win32-atomist-dir-195.20180919152223","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"7a8565acdb74740f04687044c632ce9754fd9276","_id":"@atomist/sdm-local@1.0.0-win32-atomist-dir-195.20180919152223","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-elTX1ZnJBveAwiIu2/yGGECCx7jyurzIjaImaIfB78wFLfzqV6B49/hzVyT/dos1t5DGxZRAHZvSjsAzxWxwSg==","shasum":"c755dfe7509c1b13697337fc3f63a84b04d57959","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-win32-atomist-dir-195.20180919152223.tgz","fileCount":354,"unpackedSize":1277161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbompFCRA9TVsSAnZWagAAWiYQAIRqObTOGTnqPG8Bjdht\nRS6Etelpci1+a/whP74HbwvbCVDOnhCrOvjD+m8YXJ4X6CTFPO7yAi6mKFes\nFatImWzlSdoXqkl3ZFzygF3jTabAMEfFiBY3Lp1K8qWpspjk5Fdr4nm0mVtv\nS6Wano8K+KxY4m+usHwiyWfCrjj5njOuzJQvWj/r5NBPDK8V7Cgs4XJ48LdZ\n1srwutXAgQL8aQN6bEK2z8l5vuqgOm2V1KlRUw6qWCrSFDJduJXsNctJYevg\nQDdQxoRQ9v+/DwXuaKJocNwiqw1iGIiYwXOw+yXQ/zin02ZCprxWPpw8mGMR\n6owaqqzXTdwYYIErXPiOG4WaBfv7JTf3RXBs8JUQple6x5tQB8oYCKLOGHzC\nqgZS6rleWF4Hn/daS4NAlDSi9fhUr0jTV2ShD6KecCA5rQFgOJB/DCdbrR6e\nPVhRZLoXmOCk7LHGf3bZfH5x77cHOVeUE6YWC8pLzc4rIO2pHIJlUivgFaHX\n4N90wYttl8f1H203LYWD2HXY2qU50yLw0mkpJgSi5KGQqNcercbZRy/uSpL7\nACBpGFAuYtULhem3Mllr8WOXpO5Ysj27p/imntni0GnptclPPYqTugFDpB17\n4SbBoZjXatidg42ZY2gXvXLGQpjo/xy/JP0oJSOrqMXwGFA+vQhMH07p1AMK\ndHXK\r\n=3qh3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY36cWpdcUpXGzUNRqLKLE9aoS+GTUxkRxlWoYx+DcPgIgL7wpryoZfaJRm+w7N53yVY71L000X+IUj4XMvwl59SQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-win32-atomist-dir-195.20180919152223_1537370692936_0.6153098395456869"},"_hasShrinkwrap":false},"1.0.0-win32-atomist-dir-195.20180919152652":{"name":"@atomist/sdm-local","version":"1.0.0-win32-atomist-dir-195.20180919152652","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"5a999b193b4212b908eca04b2588e1dbe504be51","_id":"@atomist/sdm-local@1.0.0-win32-atomist-dir-195.20180919152652","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-DemTy5WVscgMxsYeQhkbn2+cd78P4hzB8Lzip1knzhxLyEWM47pi50Tzg9J41tp3Te01IBfvVITBfZ+O4sJIOw==","shasum":"335ba8e3ed8d54d3db6d27bfec877fd1414c00db","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-win32-atomist-dir-195.20180919152652.tgz","fileCount":354,"unpackedSize":1276843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbomtcCRA9TVsSAnZWagAAy5oP/3w9HsBhBIw4dJrRPypx\nEQtZadXP4VINv53+QUqjO5JV/CZMHQUzmIAvY4bBdoAhLlbO+pc4GlGCQZTy\nO4FJ1xFMzGrTbdIcZ9ITx3NOuAV144HUsHU6skUwgcjXUjjUq+dOH3CUSDDQ\nyZUcnTT23Tezg0+B31NDLOS9GGBFMCL6gbAM9k6ypYwjmaiQjbP22vmlnSWU\nEpWRQ/vds22CyB03zFIzFLIbCTJCjPMertwDHAl+uKi8iP1/DABuTTynjca/\nzyp/F1rM3Vvt0Z/2dvx/VevnCfI9aAmem5WcF3pToNz7SUrffAjKHWbAJrQ+\nd1eiEKfHteVg3R3Ni9mK+Xw4Vnv48dn8K5wiIsm52HZXIGFNq3S8qSBVc4Wu\nvYGQIks+x5iR8ijVP4ovaI6KyxaNtQSTklrQ2kFWX6dUQsc9MxURRoZmhiWd\n/N4h1kFcWRQejKioU4Ei7pU8rtOgX/H5i5olh6/RK80uE3n2JU8Qo44Mi0sV\n4GUqS3KjwGzQiarP/EYDbQOPU9e/dDrKoK/eidxnWSPMP81K84xACPU79Cj3\nYX6jPNH0ntEoY5xsIWzvo2ZQX0BlcFPFDCXbL/a8uw+cxQwwg3xKQ/9FZh9q\nnYpSkrNq1VKfxQctppODe0sVqchu9XyFruaxXKNlr+/Dl6iXWYIRrglV7yZK\n6K1p\r\n=0Vg1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICZII7KkQzMrwgVmH+vIjsh6rZmRJ6j1avW1muGzhylvAiEAlOAzPHS5k6f0JK2qPhL3i5SgqRscfMRAiqsX74AMhp8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-win32-atomist-dir-195.20180919152652_1537370972122_0.7217110372777946"},"_hasShrinkwrap":false},"1.0.0-win32-atomist-dir-195.20180919153654":{"name":"@atomist/sdm-local","version":"1.0.0-win32-atomist-dir-195.20180919153654","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"3770e0710e670cba9a7600b1a562bf87e599569b","_id":"@atomist/sdm-local@1.0.0-win32-atomist-dir-195.20180919153654","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dFEp7oje0GQXCakALMMCWO0dx3lL4mkG8U2vUsYh8zNaAF3bRPhO85Znyq//FU4VpI7jrebwKV7LSnTUnBsROA==","shasum":"884880c1cd9c5bec4d4d4873f5f0445a53bdc122","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-win32-atomist-dir-195.20180919153654.tgz","fileCount":354,"unpackedSize":1276843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbom2vCRA9TVsSAnZWagAAtBAQAJn+XrNQ0XpC2kE7r4BD\nOGkm7WCJdXeuvWCQ+KQ9tXKWR4ukPqp+Qyy6GHyT9kLUH5zmkV+rdZShi7fF\no/vu/31Sb+V5yCIAIbzJCC7gQWn3k0cgAPuNhjGMOLKJwgNONaLMaNx1hvUZ\nnQrgGVLDwPSwJ3kr7Hoo7K4gZoKdnieaXt7Dp/OIXMBF/GyEHjkrpP5+kYA6\ndibJhoRavRaKmQ3cNV9bw4VSeXxuyHXhpc6s3tJKazWJgoWDLYt1t1U7pRDs\nmFzxupT35bGEAkjxhPVrDJ8BOh9t/opdbpukU3B6eMcmWQDh4IqjNvSoJN2j\ngFBic39YHdo/NXb38jcr44a1vF+xeOvPfJu3pjf1sHHeDznnndf/n0DB2wkS\nH8aU+ZUW5EJazG5MaeP9qzf0swVWgzeccNbFxSovliC8EIdyGkbbfBTE0ZNT\nPLTZTU5r743IH/qcyIFB2GoW4jcObCHLYp118bEZrQ4hi0Q8kjYJqRGwvC2A\nWHIKZ5mDcAgnKcKX1ZXwNn8l6p6BaH/S4esrbN+RYzG7IuaTSliRQKImoqux\nl/KGecvvRXYnM9v0+wnCy20MGVHNK3Xi55ebWqWMoUi6b8QuHNH0ztXap54U\ndjRxRiGjlD3tCeHQv3jKuv72iGB4v691aI1EnReA1weKeMiv06WP3q9V4XLH\ntX6p\r\n=3aGB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdLk7i5AdY9NyVsfYJuXsMqhi/jiFKX5OnbsqEkAqyXAIhANnNcZx6FhYWlNg6qiQFFSi0B2YVoAdz6pn6kbitIJeE"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-win32-atomist-dir-195.20180919153654_1537371567054_0.9532840058431105"},"_hasShrinkwrap":false},"1.0.0-master.20180920113246":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180920113246","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.4","@atomist/sdm":"1.0.0-M.4","@atomist/sdm-core":"1.0.0-M.4","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"dd64cf15e857d3e9424c54934b57d1018339d5ea","_id":"@atomist/sdm-local@1.0.0-master.20180920113246","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-SKDU8aMux3EsWIK6OYhoKkmuMZvmHrlmD46IRCYkWP2wlVcyVyyIBZ1locjOvSISIop1swsbdvHNTSNF+ioPsw==","shasum":"4d981cd58e4a00c8d393638b2cc574d3bedc300b","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180920113246.tgz","fileCount":354,"unpackedSize":1276828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo4YeCRA9TVsSAnZWagAAbvQP/0oGYE0yDGXzRkE9NKWY\naVYhiCBqT6P7CGZbdxd9Em57Ve4qtXc3Xb99LDAXaSABN3LmROh+vuUQCuF1\n8ZBWp0FM4qH1x+Lqv9MbfhV17132asnMctgmAhdeBVsGsiLvIeHPisXZYYfm\n6KmMd/jQItjKBCyghQHofDd10U74FnNcUcEF12ji+sZPJx/dAhvv/EZZvMpS\nFu+D9kGaCuSFwN4VlVqiT9+URdQ8BpiMknQs9X+P7kPFY3Sw6/ZuZoq1RNTO\nWj5OGhiez6BF8/l48RghLfivdvBPDZeBNHWJWLf/TAcUgBtj7wP6WiLi51tn\nCNMTzUveuaC5+MiZ3KUp1XiU/mLpOeLA3Aysxzwy09C6R2p6ukJyQb3CY334\njvfzN8OhNsxMmoQPgftPJNVXed0CL1YLKpc35TnlpaSbry2pZlwuy5MAcxpL\nVOTe3FCrYI8ih8zxikPwOmp3j0LucAsaaeGoItBBov60DxQy690TeLHNEUgK\n9gZnjO0lZ5GV3IMtUE76njbHB2AfOjq1YPu24A+WeQtDnOWpLxrxWaGhX+T5\n5PFRwzCnJPRz0hUTST3DB0iZ0H2Hg78gHtCRIUck9W8EROZ0fg0HfCBUj38A\nmn65/tuBb4chCsvpvlstBn88VcmyFbvH8Vq96mVl9rYni+C5GZzehJMnNo8g\ntCm4\r\n=hnmb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDM1qi90cW4JmcUbZWRDauVsKr4QsT5cZaXqjgeKbWzgwIgOq1h9dxfcJx4+qusrifi4S5uXCph4fCfBNkOxkjO4f4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180920113246_1537443357363_0.476759248329494"},"_hasShrinkwrap":false},"1.0.0-atomist-update-branch-master-1537450620011.20180920133708":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-branch-master-1537450620011.20180920133708","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"237d54858a7bd7fbdf360aedd167673a676377d2","_id":"@atomist/sdm-local@1.0.0-atomist-update-branch-master-1537450620011.20180920133708","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ux17IdehrOmXWIxwwoVCO5j8eoQ8zCLP3jntUyAAUyqspMhJhAo7av+wamqTQVis2DlEyZ8a8jW3B2F/iamHeQ==","shasum":"52ea18a73efa617958754638ec51a8214732a4b1","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-branch-master-1537450620011.20180920133708.tgz","fileCount":354,"unpackedSize":1276958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo6MuCRA9TVsSAnZWagAAKWAP/it+wDQsRKhy/zHkpY+l\n2She20pi9cwxv/l99u8A1GuAWpIyYya1WRTAdyhPvSjl/9coIuTCpe0SGW6F\nkugIXZh/RrxRbVkHx0JhBm/Z4IN++JUi3ZfYNTfGClPIrqDMx34r8jYm5efA\nlvoQDQB2jX3471SHfY58fEb9+3GYDk9uUf90M/enDy7ZCnQ7799zS2MZDMZg\nJhLfxNUKdEjh4SquzEIHKBq06R2f0zx1kTCMT+61Xu+mdXSvPL/SZ2AqUXoO\nOUrLxgFCC1nfiv7XNDLnuDPHjtftj6iUJKp0lG2PLLcAiiFkwfJc8yZ+wRVt\nhLbClQ4d44T58fZ0FP6/wo4Tjw99r94IvwlwpDqLnEP5leZmzEMW+/jq7BhM\nVi42qRNUWM9Ztf9ClseyCl8TBrFKP+UyAk1i87dYikIXRDd35KpihLgkOf9A\nhSmEOoLLoORv6ww29iwzI6F3helWs15Q9v7RZ4cnGNL0sCXLwi0Gshgl4QQD\nNfwj0vhapzLZr9KEIvQYlg1QRHQ4tUztuG8PP3iwhDQliN7nX2W2ArUvoam1\nJVAe9SkGQWArkunWGBMFZ3uUY+CcVgo/fro2uNliQih5rPLNrqebHafMNknX\nlhTf67lzmcdVwqj5eNYxV8mgrjj1B2e96TggwGIRBn1CUs1XKkd5xr6kJOML\nXwRD\r\n=bZNv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBXEEsf0KoCjtVaJLC02eLqCGaJwgYtS+Wk+s5s6/sH4AiB+R+lO8L5pl7ANTxjQX0BhvkgQDhYv2KG7OF6wACoBfQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-branch-master-1537450620011.20180920133708_1537450797811_0.7446591002920511"},"_hasShrinkwrap":false},"1.0.0-master.20180920134128":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180920134128","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.1-master.20180830190736","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"a3442abebd4b5dc02925b8d507014fad5387416d","_id":"@atomist/sdm-local@1.0.0-master.20180920134128","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-XA18c4QWysB9dIfDo2QgVTxL32DkhZY6mlz3EeDpskEhcyhIZGsD6I153UJIck1PBVXL78dMDo4Tx+iw6GfXoA==","shasum":"9e3eb1efceea9dcb5d794447d212026ad6e17cfb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180920134128.tgz","fileCount":354,"unpackedSize":1277425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo6Q0CRA9TVsSAnZWagAA0HcP/iNcYLJmDFCDBzOcs6B/\n5yDtzsp8uiPwPrMXjEguOa01XQNWpPaggrsxinR3I3uubRSNiLmbld3J2P4h\nImxP8Y1bHUel5XE+U4T6Gi5g3w6ueijarIRdUkVs8jJaF/KYfIq1jrOdsLey\nkXUMmngN4FXXzlJ0t6HSbwUwpKMGRxxC7kTBheHdF08V1d2HyAVrXRmAdAza\niKykKvqkbdbr+U08Fa6qS8+QkQDi8vGOmRDgrO0EXLbriF4ZlGUvD7EF1Yod\n9LViKDloHBLL6V4YjyGi/uKKKGPKET88XC3u4SsZahSohlfvRNM5GFCLvqDJ\nkkhqFl8CKWJcyf4YdDNWQbPOj6w+K6AwiY+dgWiuR5575au5W7CwYq4XgOjg\nPJFD2YHGpHiD0ebhbOUPh6Jx6At3xrD54nciEt/8igKtEu49WH8J8RwiTIon\n1TW0PWAdx+9ydoi2iysNeySpFGfrq+L81eKQGJ3HiK9vTs3UHskeiB8Vb2tE\nzmX7ucBuR6T8GMWij+gUM2zsEadIlAHbUhGqe64Aci2elBQfdgLAuuiBYTy2\niHr15A45dJA4YELEaHsbE6hsiuORgZhukCRm7h01VFD/fIUm108pEBimZJbA\nDyaUeDheb5dhX8+29mNlkblZPgxvYDHb/bxRfKgka7gLP4zOAqB5zRfCF1gF\n/Jeg\r\n=Gmws\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCg2L+JzBvwZxoAOnKXrkytQOYpLjwBWDC/dVYXEoE4bQIgDfbrglefqqpzBmAKJlXwRDfZyBzn1OzVT96ogyUWK7k="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180920134128_1537451059938_0.2870078959568563"},"_hasShrinkwrap":false},"1.0.0-atomist-update-1.0.0-1537450948728.20180920134235":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-1.0.0-1537450948728.20180920134235","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"36a30b129ee4d579c17a0b62a302e723ab0b76ff","_id":"@atomist/sdm-local@1.0.0-atomist-update-1.0.0-1537450948728.20180920134235","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-RByVcGVPwh7ukocsQ8LG5VETaic5ZfR1GYcEqa9c/XSG1i4EobYSrLGB3TeYC7XAIFD11fIAQ8WSzPGL/TWk6A==","shasum":"b502282b96451444f0c8d9393a61e7bfb8a91e96","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-1.0.0-1537450948728.20180920134235.tgz","fileCount":354,"unpackedSize":1277431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo6R6CRA9TVsSAnZWagAA+F0QAJXLelwuOx+Go3qyejNT\nu5jYce0jRqxbRLWMAh6Gge4XuVhQduN8Cccv+TrqrSZXtf4/Y+Y9H7s82++L\nHW+ElkqoapVpifBnLh3UmUXpCbmJwC3AoJN0h63E3uxJ5ysUWv0mT0e1GsFq\nQWMbKHnK+721IgcW8x8XJ8zLyj8rYXJKJyNCnhZQ8SZTqGs71Hh4PcjJwVh0\nFn5fPB2q0E6ou397DPxP3YAEvkE0t3DuMmreep9u7ERMPbN20br1q9h9VPOf\nU6pwYPqM6Y7ANDBbgA89LEBTg7qJjJi7jVkQ5X7znU7773ZaMucB0s/IZWnf\nGfgm9LJUbkRsVZMy6X68ZxuSoN9rjRMYGEt0xsYR2wQeQ46ah4DTPmlhVttV\nBw+FYhvuMzTNuSMQUDZ+4xvgbvfMOgSqXYaiqlUtnbL2xzFKH+PjjWwj/UA8\nSHutJFKzYo1KSl8MXNqkbdZ7bH+Xd6wOGLUGUakyTK2wG/Mlpex7+Ev5eUTz\nlJFuvnYw5rQaya6XTlRmRc7NsReeC5ae0cVX/vOlOJ2/8lLKE/4lRjwZX5qy\np8mfJA+wpOAHAwUjcIgmua2+9DvQjUaebFGevYMJ4LT6FqCIml0BD/0zMsml\nl7ZDsOrd7mwtccChPUvAgkiNwbLqYpgIrZ8bQRVP3TiP+/UyLvnc2gXx2FM3\nVPWe\r\n=sWQr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgFSADHL9ZMzHiSihYnTboviUPS9KaHX87xh+oLqhUaQIgWqO4ui7BkLsuQYW9yiDKKxChgj5z3uzp0p/IwpOY8+E="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-1.0.0-1537450948728.20180920134235_1537451129210_0.1371049808463618"},"_hasShrinkwrap":false},"1.0.0-master.20180920134549":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180920134549","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d5c7ced741b54e7ac13c0a2f520453087744d9f7","_id":"@atomist/sdm-local@1.0.0-master.20180920134549","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-s3UNIBuScRiOKPcuWIbXXhZ6BwYKWOkcJvlc0wAQoJIRN3pSX9/D/A7e3rMnIcFMA8ZDbs+c+uImsNaU8W6kRw==","shasum":"6bd2caf4356284ed8dd03c4f53402e93146ade74","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180920134549.tgz","fileCount":354,"unpackedSize":1277403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo6VCCRA9TVsSAnZWagAANhQP+gKQB+KGpYw5llnL2SFo\npb4TEdNQSR5qA0MQ7rwCAB2JjwRTzEsNASgdn2Cj9f+LScJRdRYmu/Q/Oyh8\nvfIdcu+crUT4Fy43gpodKL2+j/aZd0rtT/lmMb3HSjCMKTavrE5PPaHOrmXM\nFbaCCRvHnKOa9PslNCqUnCnEkp5qooTDP/zv5SZpFMv0WTzTKp+N9i+NG0xy\nJ2XnlIYkRlN6lnvH2+nV6KTx8J561WD610i91xz5afGXmTEUbzZj1I2v/l9B\nR19GnjStOrlWvlG1hS2nz39XQaJHpD6WD7kT+PKWp5rngjQnYvgeG6xCClIn\nCUcG10oLl76/5VyfaFj9bLeiDK/DYlLezeuq+oMfKKFOvv9odXkLs+FbTEhn\nXtseFThZGU5mVDFRzF7Zrq+ylHk58DExF3De5U4I8Y1AQ6uyXgfPUs4tEm5W\nzW20RY4ZMOO3szPEsQ17Pj1o5Ckgm3sUoDuONohU5eTW7iQZst5B0EvN1oDK\nnQHFEr3qdjohMWtkJYRlg8g0q84KAIfJKhtqNEROnghmxL/hzorcNoSyVSru\ntITnr2Ipn2I6CI700TfOtYlhB9X1Hl3Q3tD4QIu6sf/CfSArZjADmnjxSNHn\nSJEC6xXE0gVDwr4uCd8tBKd9clSLA9igv8nD2ADJaydpliZ2rf/arN3nKEWC\ndqlq\r\n=pv+k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAa96Tcaz83tzxPGiRB+4WUeiv3YPpZV8llIBppgTZ0SAiAHMUDM2//m5Ebc+FBIVmK7TSgzkyUZ7FN7Clzz4ggaPA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180920134549_1537451329558_0.328362512807592"},"_hasShrinkwrap":false},"1.0.0-master.20180920142745":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180920142745","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"28fc1c4ff2bd68cbfb63b8699ca01777a92938d7","_id":"@atomist/sdm-local@1.0.0-master.20180920142745","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-EiquYpHKh4T9g3zew4AsvCM/bOjtnJdyyGcm/Cx5G9sbZMXzptXH1Q/g86NpXoz3CtdwXMYWR9nYpw3+DxdLTg==","shasum":"4a65f1b2aff4690129eb41acb1320e0db50b5836","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180920142745.tgz","fileCount":354,"unpackedSize":1280295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbo68VCRA9TVsSAnZWagAAn6sP/iTJI5ytKDlRBa7CD+AB\nTqx1HNfVYkzK60Yn0LeAasFw8pOo7STVLjmqU5eGqDFzaIQl7Yoyv+f1WxzD\nTBkQ+M1jkayShOMc97p96/h211gk/48Z96SR1+aCH6Knr7lemOJ8NKhQIKnv\nYs9ZBLQG+WTW5DuDxM3pAg7R+rurh6fkTMFHE/5fC5ixSwBzcvluQ87yuIgk\nyUqjiBXwsUU3YI6LIZASBal0hVTDrOHlsxo9l1mXC2Uhyixlf6/Oj6A1Jk7q\nCIVbZPLMPTs65K+bz9nlhjYtrmkEdA+b+hW0DdIImSZbKot0EMSIO96ka0/n\nkGYpeEzG31gPwKneNj0PAPxKlZeg+BPv59Jnor3yqLhog3jnMe7Ng7tBNdtK\nqlVKGd1U/5xXasfAf+yzsPf2IdmEBiT4uuNX+R8uUzWZcAbhiNDiCB4BfcNc\nSVBnOwh3npSuyxStoyw0PaKhoEfKNKIqau0VSAYlvHu9uZPx6wJLhn+e51HC\n1CHAhKfMDoRc6DCDTZdgOHeCAU8ouCIYc8S6fufS7BXjDrl62nJj6Toc0W/1\nu3MGH881FYgAAX1o02qbtOQvx7H1VwmDSCW4MckKDnnzq5JZaNsODycCI2Fk\n8IV1ma5WOUjyifLz/R2FTmrAvBwnYUz1RI28WqEA0HdQGMG28w6kqU/VCrhm\nMgGy\r\n=5ZGV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGHgZMP7TG2b9veKjqvtu6jFdi4gtYLxjNFDJjfvz4FFAiEA9N1r3UJqHL9B3h5CEEkPvtZu8AUqMSe2gVh1pVIDfOQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180920142745_1537453844492_0.9416593846059438"},"_hasShrinkwrap":false},"1.0.0-master.20180921185521":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180921185521","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"711675200a3e1ff3ec5e8dc54d8a87ce198e46fb","_id":"@atomist/sdm-local@1.0.0-master.20180921185521","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-H+JtrkthbCkGAZxpmyZennhP4RHa1AiU3ylF4jAw+H2T1fX47fegBvzP026dZnuDxMQlZuABu/2IO+1TnsdRgw==","shasum":"77baae355f4b3da029adf9fc025b7ca8ad893d92","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180921185521.tgz","fileCount":354,"unpackedSize":1280511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbpT83CRA9TVsSAnZWagAA/EMP/3Zd2sIxf4Csk3Lh5cfl\nYQccCAcQrIJPPhGmFNAJ24NW3zNCpagyDQ6Ew/Q0Audk6/bcNHLnG3wOI6ZC\n2vmPKu5IQ0pOIE2m+kN5lqi99rmQfo6gPDeaAPLyE86DxhCDOrnPG0K1mjPK\nXgdPGyXTIUTFjd0xTwG46QWIPyuKJzmg94PHz3ueyKNpDQ8/AihpDku6wTxl\nbeeZ18BYJDf5Y8zJgf26nw320aSLn/OQ49MUPKdr/wjPMH97/6VRTOvkrdTQ\nNgV2HYdi/sLIGR3MYqEV86a1RHanYw8B6EQrfVHOhaRWXyGVarPEDNAOfDlU\nGyyP8xFJPRNkdfeJ21gT+EQ6yRwKPIGx/ceE2ACMlxbJx1gfc03q0Bsl3qOc\n/++NTTvyr6VMxCjjqDLJu5apOnh4so9N+I9BG5XL555C9n9zEaocl69HrKGB\nn7vl0JzI8MWuTZSxWjLbeN793TMzkDi14MsQG+0nbQvarHpu4QkpFvomTgbN\nbvj53yMS2Kp9t7wKSKIquDw7y5oJbXVXKzfabF0/ixs6kIZNkk9KdqAFNKoZ\n/N4r++QHYd5G59TkW4r9/6DFR5Vn+M47YU7wiKyqy86tskhGnQMyCRkuvMxc\nysVnpm1b5mSucx8VXSeGwJF1THU6GaNDO6Aks2bBMjYg9iW2zFRLN3dcBxT/\nsrnW\r\n=nAXB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC0LB8mjAQNLvbToC2IwKVCI6IaV41/9LG7FqX34t/6DAiBQ1u8kWOWXhdPaDDtRb3EwtjNRNhg50nAwWQjX9PI0OA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180921185521_1537556278676_0.07398466908287649"},"_hasShrinkwrap":false},"1.0.0-master.20180921201329":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180921201329","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"711675200a3e1ff3ec5e8dc54d8a87ce198e46fb","_id":"@atomist/sdm-local@1.0.0-master.20180921201329","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Em0CMB6DnQdXvSBABmRZyeH7ZyFolm486T7P/tPSH8gZjv5ypMezSyOJyN2tcZEH+mu4BfUo3cXtMghfhLbPvQ==","shasum":"e78c5e08ca22f67b395539d014c97c3b7d99067c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180921201329.tgz","fileCount":354,"unpackedSize":1280511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbpVFzCRA9TVsSAnZWagAACwEP/AlwjHVkOeqq4zsoX6V0\nROItPKU4ogW4RbOsxv2NpR1jzYF8C1WEp96q65BQHgWPD332D8l+m50mK5Jn\nEMaM6cuJ+LCQ0+BBpZ7NEaQfiwUayjylYKixnpYel9rM1pxqCft4wSX8XnLT\nG0I84ysleAWnPHsnxIZVG1GMHmx1DR/K1kYblaCUDWnGlvNpVMuTnINikmzM\nHn5wy2r8spFD3gA6HcNUFVpQyLvMgE+9ijkv63vib4peBBv9uI1MfjVoGQZ6\n6h5psKExe34KUiz5nPR05wceCvHPiZJE1sz3BhmJLqR9Cvl2Oq2pC5HVGWKD\nUqDpyxJqJr7JvaVZsErt4UXwxvVrP7HXxWuObfFuj0hWR5KQa5BUEc/MSrye\njOD5BMF4PU17WwideRxgxvNI10jS6RS0he2txDwhLkaZuYLLUSUywcULk/Hp\nhEArRpjhqtOKv3BB+Sg6k1U2mOGD5cTyE9tm2vbfRquEjXoSUjxXAKmg5jnp\njNqxrzKN5JBRu3Dwth6OSq04XOkjWO+5p5u8uoyA9X5Zcpss+nhXvPq14LRe\nzMYQa2yWEL3/23cXAD8RrD8M8GDk306JBJru6zttf5SbwC1A2wAsDinzaoBk\nk7QrMJutFGWFTcXLj0k4q0EWxnWn7xV2xXf2udRKa+Cw5nrMlA1kiQhmSPCY\nskys\r\n=nXar\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGwe5L8IWLkudjFPFskswWLwC67k9g/nxAKzboYwC5TcAiEAlvDGFQ+8VVbJ5syvn/UjncdYaV9uHBctzYNEBUBV0MY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180921201329_1537560940208_0.5538744178115209"},"_hasShrinkwrap":false},"1.0.0-nortissej.encode-action.20180923025620":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.encode-action.20180923025620","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"dd6f62cefe826126e8cb63a02c06bbc0b2f01476","_id":"@atomist/sdm-local@1.0.0-nortissej.encode-action.20180923025620","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-T5IZPaXYWyU4l2BUZlsT8DFgv/0IYXpphn5w6Ro3XKP+YSXfNziNwNuF+4ThxSiTrtE8ymhWxkjBE6mF9fCBLg==","shasum":"1a08185bac40c3aa099be8653bb11d3210cf493c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.encode-action.20180923025620.tgz","fileCount":354,"unpackedSize":1280484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbpwFvCRA9TVsSAnZWagAAO4oP/2L2UIdYz75oVl3eOB29\n/fXt6q+YkqaROLKApffvO0l4GqMZhsuIws3CU3Oryicu0NhmhVowO/kQIUEP\n8KYarY+h3L+Vj1N+W2J0WHnzJk/p+kM/QNyEmcCpbYjQDnTrw3avs6R8azCx\nBOPe2D88fO+AF6W06uAqy5Z7TniWCnwDwKmviK6jUcVSMKRZQXEHwkXowB4C\nANPd3jEG4lLifhoobHHF398g18cQnr/bplHbqH64ci36+XvHkrf/ey1xMPpz\nC1abJiAVKTrAdSVceWxlSHLNBGE6sp4gfASjjcpLkveOWTAtIwmV7ZvKQgLn\nS1Hk/pWIeMkqJBXbsdLFTUTEiUwM+eSzlFDQDvQ1LJIkHlcyD9kA66uJSJcg\n9bm4DR2iGLHjk6+3NOQONZZ8YWzjfKW+DDrhV7YADOxspQP4ejrlZnuaF+pl\nz/2ZEYVDRVOFA1yXsmtLpXdSoAyRsXf6a+aVnF2oR1+qBBChRmb+H5chwI46\nkaZLrLMHY6AmsTKEq4zapCbUPQq7T16vhgL+2Fmxx+kIsH3B2ebsABshNb95\nJAQboiM5CvLu7Txz3HLc3aWwXNVl8giOZGvH74gaATdyLweLZr32tV6I5pj5\nDE0zZN1H7FPsp3Mr/IkzKkigi0yo6aFm21DElZhJfhCdZjpDHXrOWQpVvwFt\nMujL\r\n=HnoU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMgCj3HeFRuJ5s55+Tf442UirGah8lechH6VAVUvz/0AIhAPbumdij+D3araI6lWNnmAM4D3HntO0+YmQxUUPljmo4"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.encode-action.20180923025620_1537671534476_0.5100030702560017"},"_hasShrinkwrap":false},"1.0.0-master.20180923102924":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180923102924","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"55fb6c915dc88116cc1585f6eae088cf93a39054","_id":"@atomist/sdm-local@1.0.0-master.20180923102924","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-r3xfkdk1p3rx3aB5YNwFqUBChfv/v5OpgUeslf86RTZ0hp8/jpYm1EjDhLAG39rqNgVesrjC6mvX1Q3r0pAlag==","shasum":"e91344f7eb5296c62a51d4c7d0064bd4f41a5b63","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180923102924.tgz","fileCount":354,"unpackedSize":1282369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbp2uvCRA9TVsSAnZWagAApdgP+wTThNeWQR4SNEq6RlWG\nv7P/ZqAt1Iwcez8D1jS6wp4lKst5cpXZ8R/cuSp2A4AVQUNP2nib5gRW0GyC\niReaQg1+h/0s8704ChBJUT0zYH54NSOFUiy1ggdWPb+E70mC82pfsy42QJiO\nharVgGoSyUofXuJa3a5lgxqn7WzVm9NUxJbjXqdcBS4NpjjisGYQnkK2j+o/\nM/X7Gcy9EKIFYxRjlWD/+FoImHwBfF9rONvj5LMb+pvEtcJ3rxmLM4x0lVgQ\nPE84NdkvkO7uLEDXE44b6IvokY3EfT0UkT1D6iSvmKOQ59vHPnC+8fNgxCcw\nFYfx1Cp3Y10UL4kvVEZf7soH98Vh6ZgfIkMcLAKuOnP4w2lewmE4fuu26b2g\n0eCTNSlq5td/wDD7jFa/KDGQLNeYTaYaSFODcNOc4ybI8TSQH2+NLu3W7IYG\nPT+LBBODsr1i/01+GkZDz2oIm5jQRtyRYhfSk8Nfh1jV8iXrOYXH8TrQt/Ed\n/PmInPD3/+g2gEQJMvPx5unyya95xPec5dzCUFYch11r+l+AKiqIEpRTtEZU\nEL+BUBLO91tlgJtxXk4C30ZFkadTB5m4VB4EemfzI0+KqChCqMvsFduT3w4M\nIngDVEjffV8PUqp6EH8R0i0SYrgNu0N4W9lnS+P5Axi223HCGaiIThuDs+hQ\nZorj\r\n=s8rG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFMzCBuu5oXaueJgyaaPqTcajJ2MvQeMIij68FaTlNuAIhAL8edDGOSQ3VLscsMrd2R8MNhaBRp1WhYQUrUvMjk+G8"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180923102924_1537698734501_0.6796067429839037"},"_hasShrinkwrap":false},"1.0.0-master.20180923142034":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180923142034","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-master.20180916080140","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180918193639","@atomist/sdm":"1.0.0-master.20180920130138","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"16d82c005c285836a17da76980e2fdc198c11ca4","_id":"@atomist/sdm-local@1.0.0-master.20180923142034","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-6MfEp00YHdPz5ZIvwdx20HtgtX1UIxBo37CDuBJ6+vo7egtdS5qRvDQ2O2TMQ1CjqWfW9rgMQMaIV/3sdyU+tA==","shasum":"13d42f3b0e3e1b08612ee88e1c07bbe3df3b9c45","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180923142034.tgz","fileCount":354,"unpackedSize":1282419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbp6GqCRA9TVsSAnZWagAAxUgP/3eivdecSEQVUZHjoX2C\nco2OjRwlw2SwTXpnS4S3rlBJZ2YSzstKyWEdvrh3lNeQmO5yt8hLLzEf7L+C\nFWrklyRk/BAfdlB92hJYSMUoJQc09NIq6/uHO080Or/GMEVsZGh1Ano6DO0f\n4X4JTboWJApx1MoxdssByLKm3yyakIph2HEXZp6Ph2rzLezM17LKB6UEXKFv\n/MeFYepJRWpuxeYSQwNJ+ZUZQe7DlqpuY0WZ/+f8D3bhEl76D8VQwmk90D/k\nBK95tERBOcTh393xe++/i47V6W/y9XKh4NTS/yUArfgs6677iuCitdgk1atE\nbdOI1qCso/y+wJ7Cs6bV+s4UmmEhf5Cfu80dZG5unSyA5IhexskdWKHvp6jb\n3jkQVs2zRGxNFMXp6TTKmuTJgYWugcI6O5fy91yf9nq3njFNrQFXkOPs78b+\nwOR9RGzW82m7gk/drWYGcv1iXms8a5BoJ2c60x2A7Rb8XxC3e+p90bmh6LkB\noWobocaZ8NgLEXM/d8ZR08j0IgqSO0crOf36KNEKr0bjGNDwWtx5pEagkjL8\nt5yijs2bIgZ9cCMy6onLUmEd0Q+nA+hVeFe2xmFlgmX9ww9AoScAiyk4RQ8N\nGjGEdl0RzMRfJcV4Ql9SL/4giJgHVYexxJcrWQVnoavg5Dfu13qCS76eKyta\nJnoZ\r\n=qVpE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRiwjKV6odmKPr9WrJqDRysGkCw1kGzlqS4bnJSI16HwIgNuWmc2VSnRmBpho8qu/M0Ew7iUVNzTQtJxZGrejCa1U="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180923142034_1537712553567_0.3763489009664194"},"_hasShrinkwrap":false},"1.0.0-master.20180926201648":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180926201648","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.5","@atomist/sdm":"1.0.0-M.5","@atomist/sdm-core":"1.0.0-master.20180920132629","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"075242560cefe6c91e2af86b6db014a65a7bd7b5","_id":"@atomist/sdm-local@1.0.0-master.20180926201648","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5/FLkj52+TiGkEZjw9yQAMk9k9Vpwme6prz2fXHoug4XI9UOFVD+dd6VYEMlPn2gPKSNBZOURH7U384s8EQX0Q==","shasum":"cd9fb1aab544b9dfeaf09155ea42eedc637caacb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180926201648.tgz","fileCount":354,"unpackedSize":1282157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbq+nTCRA9TVsSAnZWagAAIJEP/0h0mx450NGXyWx4XV0Z\nyPGIS3LLIVfb1+3hmWBabi5id/BLGWYKNY6m5408nkW2CNC+BwOvWKavDxND\niDlJ58NtO48qkKmOokWRB+phoeE37UiipXPpKClQYa4AuEFj8jom9jvNDVgt\nowTSlzaNvvy9YGIKa/WJqVHm7U7Hdo45W1DSqNHEbCdHIegXSEi33VT9nFh6\nZwWeMPAX0Lc99dSCcwMxZwfiM1c0RnG6dNsGf8H2RLO/M+BjINykKuosXv8y\nP0qRB22g6JXXnpiw5j386edW+bgjIP8CnZlcQdW3BQ0quEGz1U4OVnx0h86+\nO2ytAau0CsRxXKDB2Uc0i3u2GQip0aEAh8X3QhzU5jOE2XUurgVYUS8UASdZ\nvfVzGsjbxeo0oGC8KNAb/UX9nQ27FDEXYN2+JJmkUCv6P2P0EfT0YYjtsf3A\n7M5+7HewQuD7iNftqTSC9U7oHZ2W0ejD9WxldJ1GwCo86gWjnBElxfSQvYZO\nqs756hSLLiqcViZwulSo3BkBstNHWjCvV/deXYvQKpwuH6qvx36sxV/sYo4B\nihb5LrxYsvHwHj2OGrc2dvpnAfyT2vUP/gTfI9HQWourxt1U1zUGHjnQbMPr\nacEKPo2ERyT0lHPl2Zonf0qeSExf+FBENh7AbHX5uR1J3kskWgaHUpnCkL7G\nY31a\r\n=AoP2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDS87ySaPLmtquoUlsrvUieWRxnF22GDijr9gAarYN6hgIhAMkPBS0c6cukQfh3JcV10Le6Qsp+yLzPivjs6EccwPIT"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180926201648_1537993170314_0.7245669428061212"},"_hasShrinkwrap":false},"1.0.0-atomist-update-1.0.0-M.5-1537994513793.20180926204201":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-1.0.0-M.5-1537994513793.20180926204201","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.5","@atomist/sdm":"1.0.0-M.5","@atomist/sdm-core":"1.0.0-M.5","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"07ab3a75b322957ac5ac63c981b85cc83f48c2fa","_id":"@atomist/sdm-local@1.0.0-atomist-update-1.0.0-M.5-1537994513793.20180926204201","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-JgiBcEv5QE9xLx4biN+NaqOlJY/jgyKdMoPLP/JtSvHQAlg79eeGfhspsOjEwXqUWzyrF+0TvcZgnu5lD+ynuw==","shasum":"3a2c370ea00e51a8b051197d482770b8d7eb085a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-1.0.0-M.5-1537994513793.20180926204201.tgz","fileCount":354,"unpackedSize":1282171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbq++3CRA9TVsSAnZWagAAMMMP/jxQwwzWbVd/qgRw92cR\ndGdilpTLQSv8Aqecd08NkJ5GfL0Or0g2HQPdHjVmV2YwUOFLbcN0PYUJrSPN\nzPPLCNGkX+Rflt+6RkBKahyROzUO2Zr4ZtUlMv7OBD6HIeP39Nnd6w4kjs3I\nxLWnhU7V3drgfwdvHDSemRCr2TxEBVHjdmZSBNGzqlpnCaT4aXhKNVWEZSAL\n1ia1/WfmGXelBrt5xZaIvfHCFMbR4dclgT5cSR/Unk+Hs9lBr6DfzGw/x0/Z\ncixsHkjYUS7rSqNceYi+2yXq7VOkFPBikSuNgp4OLWl0E+RA690E4ufzyKUN\nIIKuZB+RjrUaMoprNEjvEFdHt76yzZTwLidZ+fu0UN5XIhZwLg6LqKMLUxrS\n85gMYsKlJegm5j1Xb+4DhY89x108wH7EtdWu9lrsDrnYCXJfiFz400JOUxOM\n7PSstB2EyxbYg3YpRQffVsBIi9IOwDbcS0a8i6h/KFk4nkSTq9w+5QFbLdG/\ngMjDYkV2+CWYTPB0YkMzeN28JWu+sn0C7U0yPbgznyUN632PzzCUWABuB9Be\nqpx7KqB8frw1hHeieU5GBWry7iRBfM8/4rxYh3NrkXTS1lzWSmRySY1C22Xv\nNPkGuA2OAGKJysBIjyynappq0nSfw9OWoZxYEPxOMaz8RNLs3DF8K8o2PXNw\ndvrf\r\n=sGAq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuhRAzL5RmIrbz76JbbdwsvVB/c+saBLbBR6wpaKlUZAIhAKP+QVj48EpsF+dEr4nNxdULl71lWYxYHORktH++aQrY"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-1.0.0-M.5-1537994513793.20180926204201_1537994678754_0.7515905471910362"},"_hasShrinkwrap":false},"1.0.0-master.20180926204600":{"name":"@atomist/sdm-local","version":"1.0.0-master.20180926204600","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.5","@atomist/sdm":"1.0.0-M.5","@atomist/sdm-core":"1.0.0-M.5","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"83b0144d504d1ca0a468ff88e8c6b7c9bd5bd3ed","_id":"@atomist/sdm-local@1.0.0-master.20180926204600","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-emO6AhCfoB24mf0JTV8OXx2PmDSHe5ayOO8WPr/zRetdiyDlrt4cJaIj2fMdUCswRRhFyKY5/Cq1gt5Ju8lI+A==","shasum":"5b27f240744b9d2911c28dd1aa64a94e32921051","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20180926204600.tgz","fileCount":354,"unpackedSize":1282121,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbq/CmCRA9TVsSAnZWagAAbyYP/3ehQwl90D6wD1slz34s\nvpLGqpQGsr/HeoSDOizWaxyPVNCYkgtrubGA9gFaixUcWvovjGLnw54zSI0j\nC2FZVOPOpursq91hWyRL2P1UsDgQ9Nukpcx4DvDajCKUj5bHbhXqdiDEN03P\nEMTLxe4PmAF3pRSf3RWvKrLpmegWZPHBts1KkYJHtD+O4IEuCXRdVtWYd1a0\nOb7lrewdnQEmM/nugx8BFdNxBhhDK+q1uiv4Cmo+TEX9iCjpJVy1Aa3g+w9A\n7xoD6Bz/5FtH5gKH4Rm8TQ31Sf7ZEi9sJGAN5LmO4lmtxPHhEBVT7f+YCF6v\nbrgFuivr034CzfUBf8Ez2HKcgrRr4zNrstKEzOgx4Nno4AQ+Gtv1AYf7uekU\neyMM2vGsac2M8zbuHERYKucXde/bk+M4+cdhl/QbixojNSOHK/Vq9+fCubkT\n2o8VS7HFYMN+ycM5bEocmCDEDRdEa/Qs4wYnq/z2GmWUhp2SXA42oVZU2rCn\nOUX/F8Tfr77Hle6GPE2tGe/B0S3XQpYXRo+UkSBYvJ6vIubwRbMzl40K1TCK\n2WKYyilWfDItVx+Nv4XQ0LNWakvH/Cit38kZfhI7Ft1320PUFGWDhkRmP5Kf\nnqeaGgiea2iAG6AdBZjCTAgBclpVfplpKtrK/INZ4fW5HRSWXzSGERpQLxep\nN7+i\r\n=CnBa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUxcvB+EibrtMUFh50VKXg6TpFFZPutFqXmAf66EYSzQIgTlA/SoFXt9qIBEmVJkyXoc1iQiHJJYtABRRlU4bGd2U="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20180926204600_1537994917543_0.0008962127011897802"},"_hasShrinkwrap":false},"1.0.0-M.5":{"name":"@atomist/sdm-local","version":"1.0.0-M.5","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-M.5","@atomist/sdm":"1.0.0-M.5","@atomist/sdm-core":"1.0.0-M.5","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"gitHead":"83b0144d504d1ca0a468ff88e8c6b7c9bd5bd3ed","_id":"@atomist/sdm-local@1.0.0-M.5","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0V0W0ueW3Lh2+74nyL0sCnWfzGzTKpWjdDt0tkoO0zIdilgwsZHKqziXGwr4GPpRHHrRFP60i3CmfmfEwHrNUg==","shasum":"81257c3e5d957b4495236c00dc0933eee40b4a14","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-M.5.tgz","fileCount":354,"unpackedSize":1282103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbq/FQCRA9TVsSAnZWagAABgMP/RdPzg/mRM2T16BrmzUY\nXn52MacvRq/5+HZVlko7Nh1v0smO60RwuDTn2rR2l+6SpnPXmYOEizYOW7sk\nnJiqjg0oYTPqj0MjvF7MMSbC3Q1d5CMRqIfsuFuHSV3lWtiUemtYpvWLt5TS\n/sls7idDJXDd0EJW/3QgvF/xuQNWB/FthFknx7lirfOzbEyUk47GuxNXnfPB\n+apd8r/B3Y7IJToDG7pWArL+gNrNoopQ9MTvlxKKAotY32YIBqLKEHmeUvtL\nyaFuFj3269un1hN9+mMdhCKWuZKJLYsNjpdnLP+nUHDVXQ/Plw3PZdM1oGZO\n9uCpZW3bNB+pMSOmamgKrA2iDlEq5L+xnz8iijElzjCLgxR4QIyz4m0UyFUq\nQPG/RThZJqukIv2WU28D1EIT90D6YBI+tgGZdd0AWAL4/jbyg660Yy7Zj3hz\nMR6+4C0spTNRbtwb9f4zsFpiqp64JCLJ+vnjSpBOFIywaS4a8JEg3b6fQQzR\nHbKNTk2vP8XDZuK33/UeX/dWJHu1YMrpWkia5E9rzAqAQHqrM1p85qTHwKem\n/PiURcInXwywlfGbik4K7n7RuOy9gAxFLgPmEIki6JaphhcMNLgwZ47mnSw+\nPw3UkFnfIazC6D865cBozExarHcdT9hiYNB6ic0C/GCLvkea1WO2zwhnw0Wv\n68Ha\r\n=EQ2g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0t0qwxFVPuzuRLf934BAZ3o7V397rZbw888W+PrHJAwIhAJkh5WsExbViO2dGDIOlNkM7ORAmoA9ZtzGVzhR8kHRY"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-M.5_1537995087567_0.7426879293666073"},"_hasShrinkwrap":false},"1.0.0-master.20181002082047":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181002082047","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180928123454","@atomist/sdm":"1.0.0-master.20181001194516","@atomist/sdm-core":"1.0.0-master.20181001163656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"5680319f9042dd516753791b2d4718520601fadc","_id":"@atomist/sdm-local@1.0.0-master.20181002082047","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Tr1ULsHeWxOsT8poFdmwNaai0usKJCIZMhBOQwgXPIP2wJWN09ccYtY2OkiHUb9b/B/woFpKX1/6kI4slgoCRQ==","shasum":"43f5281a78a10483f941162d2d9b3a4d0829a0be","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181002082047.tgz","fileCount":351,"unpackedSize":1279501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbsyrzCRA9TVsSAnZWagAA3wIP/2qkgiN/nmi+4gNOOGOK\no9ErgLEke+GkHedD0QsFiyObizA40oedUoSNGEs5AipAtWbzYO14egibJfGD\nrNeqlBbjErSjWs+qfu6RIgRlWpE4+U6SWeQ+gGiM7R7We1pS7KWAR9le/CZE\na5qhiq2tj30P3dly/0+V23912ej44y5Xjh2G+dSYsCVYcqP4Fx0mnct3NDMX\nlLthjzVQ9WyHUJm3JeyKWmTjKzXc8N6pgd3UtICOQ/LissvPq7rjrmCyLgDG\nk6D4TjvmpxGRj8x98NDHnCRIkejNApGtjyIHhSf4/1kHPfM9giFF/lv0anxe\nrrDwDPfrcK5kSyCM3oh1N19RUBLUxSbpDh3gBAlsgKD6EaDhmy4IQFj2DZ4b\n9Cb+imrH7z/lfl1zzaeZDBLboR0t+rJNNDurFe3d4qM+TX5Zjct++nQ+KheU\nig2NH7bEfA23U0D0F168Ebw4v3GmxbFjivcPHFuvMMiMTwxXmfNd+IS+qzvM\nQFpM9bxsNYHX4p+weugwU4+S57BWamdrSWemEpQC2AMuSiAxfvpP3RwZ7Tf6\nDLSDiHr0l6O8ZzYra97sAlnnjLJLJMBGPwYjRV+in2v749kZw96R/ki6kAsb\njtrbPecC92UKosCmvMSXumnFVqG80ZM4OEfLUuMEy+0kVBrDtHRIsTDt01c2\ntyBR\r\n=KLH1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBeow1af0KZzXhmqsh8iTOPm2PnLs32cRa8emWiJH5tdAiEAwp2vC5rpVOKkPCnGJ0+ciD3BZ42OtRCYrxfNoYWkH4c="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181002082047_1538468594346_0.22078025256257017"},"_hasShrinkwrap":false},"1.0.0-nortissej.atomist-project.20181003233912":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.atomist-project.20181003233912","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180928123454","@atomist/sdm":"1.0.0-master.20181001194516","@atomist/sdm-core":"1.0.0-master.20181001163656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"f385d792b9c1a1eda912e587cf4e36a027d5112c","_id":"@atomist/sdm-local@1.0.0-nortissej.atomist-project.20181003233912","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-qBurT6CNpQ9CUS9XCHSvggiNOGyKsDgoXAeSsOGhnncmlV8hNkY8zPl1LilbJv66L+Hjs/Ay0/ViuO3343RRUQ==","shasum":"17242672ba323093f69ba63afd31f3614ba7687f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.atomist-project.20181003233912.tgz","fileCount":351,"unpackedSize":1279531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtVOiCRA9TVsSAnZWagAAlf4P/2Y95Tx6XFVWl1v7mHX6\nFJDau7Q/eV8VjhO32xVSJmntTGmrjWCda6fe3UBaKUOWRHQ6e9p1Sw3PSqTk\nD/cb5w5p9BNGYzE6zz89a1IF88uREi3nROBmjzE2B2sWmLP300Orox6+BSvl\nzoHMjSDtz1ImYxekMMSK3GJtlQsfM5YtvC4K5z0nE7Kuv4Oq18XxGkXzBy0s\n9d9KH8eJznbwOBunrF729/BqWvHUi+XIJNaH02ZatFB4RLNOrZNeDFWQJ+KX\nMj0CqTYAm34bg197wYLvsj+V3kRrx2/5kCyj87iDmOw9nknzyqfqvZeJiRGx\nYjE7o6ImUCmRdWbI3OTJ9FRyWT2lrXAhrQIrrvnYNmpsotTlhknKXhfrrUqM\nJRFbrM0rQaAt0iH5qVG0NG9h78bZLEhApPbcT1VjdNP91v+1vPpFqotE7FRK\nCTOzWBL8MQdlN1BjVoIwhPDWqeXCcJVfOhA9qmKNahqX2ZDwaUzPNq2Yskqf\nObg6GXlnhOUxL0yy1H8r1FW1RnjluS2MPfJYSakmnKu+POA6ATrTr1YXP7gW\nLVAzlgPGzW7qQLr9gO40T03VijQIbIk57JmxCFu57IYcGEB3YAQrTM0rFGyh\nPU1RyYfSwqKLPdpK6+ZXNr0vF7PgoAfuq2SGcHHr08RhwLyn65MQmEb305It\nPIvL\r\n=KS9C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBcM12myZ3D2EuRgNLbDcwF0JvTPWWka+Lm3yhotUsLAAiA/WEnjqLQZLrZNc8AWsyYb/huASDUL/X82D6VZGRnW0Q=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.atomist-project.20181003233912_1538610081721_0.056522775006575765"},"_hasShrinkwrap":false},"1.0.0-nortissej.atomist-project.20181004093021":{"name":"@atomist/sdm-local","version":"1.0.0-nortissej.atomist-project.20181004093021","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180928123454","@atomist/sdm":"1.0.0-master.20181001194516","@atomist/sdm-core":"1.0.0-master.20181001163656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"28a97dfdc44a7a1933d6b2f9ca21e29e50999cc9","_id":"@atomist/sdm-local@1.0.0-nortissej.atomist-project.20181004093021","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ariy1CUFjKpjeFXX3jtvpN4jdrGy4nZ8C6RcygHVSn7WSHTv5I4zfm1acehoRkfBVZ7W2KogEuFP4IFoTRQ8ww==","shasum":"222d5226eb600d4c34f41ba9a89d2e14ed6254e4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-nortissej.atomist-project.20181004093021.tgz","fileCount":351,"unpackedSize":1279578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtd4+CRA9TVsSAnZWagAAjwgQAKL5gU3ZV6QASRuYMYVh\nYgGeA2PWzfF8ta83//k/KOBEYmaUa+0qAaEREYLqr8EaZptD+bsesqz2ZQ+x\nEakhJjzIoLRY8zmCWWfGVEQE1ZvUjpxiS14iXMqONM1EfGlCDeDR/pMpqTc+\nmjuMA9vNg7sDl2A3XAPuS93HFT1NsvbTkNFrs5xMu6ma9o6bMKYzFfi10sOp\ndJrBTqwSlRbDtk92GcBSyaoNllqAXWmq6K+GhgziIGP+zA3Mkrnx93pzqonL\nJpqk+qQTGDydIrkvWO3B7aur/yK58xHCG9PYGjuY29OHtuQCVR32qrQnUhan\neK2CwQS3Rua78VcsxxNceON1hGlkEsvXULN5s+Y3a1FqTFJPM/F2QE3hp4Tc\n+5ZIL7Z6O7FwaFv7KjgGvrlGeR528igmRtn5pTh63ykiVptElx1uw9H+AcoQ\nTTuCstqQlmCYDvp2aiTATnzOyZEcb8qJ/U6o1glSM2RItObIQMLaJuM79a/m\n74lc9YmVLXjEZ5brdUvFxvRE/xy00Sb5s8BCDV5/T7wY+z2IU2srxIYRZODg\nA2UXTL2oGElPFxIwqK7knQr0NYcKfYBJQz103sNAqtBGQ4c9Losh9j/7/Dtc\nU+yja6qZwmJevLhGfvvItAymukxAsoPbGP3yKo3THta1Ahrom/CmcApLRvE5\nUVCr\r\n=t2m7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXgf8PONzCnLQQFLbMctDwrGLTTHNsvCk6sYvaBZvXFAiEAjGCtN/wZrRLCsa8Dnk6MuDAqvn3utGugjCDWgskaJVs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-nortissej.atomist-project.20181004093021_1538645566266_0.02467125837978057"},"_hasShrinkwrap":false},"1.0.0-master.20181004094259":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181004094259","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180928123454","@atomist/sdm":"1.0.0-master.20181001194516","@atomist/sdm-core":"1.0.0-master.20181001163656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d8ca08fea292685ed737e517447010d6aba40d6c","_id":"@atomist/sdm-local@1.0.0-master.20181004094259","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-44zqvXtNzOBK0jxDsupeR/2xObQV7Wo9RgDgyNx/p5txU8j/s3qa+5VL8DZH896Wn5VUV62zrX6DQC/GcN3wwA==","shasum":"73045dd37a37cfd0ee9f7979a04647be21f9aaa1","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181004094259.tgz","fileCount":351,"unpackedSize":1279692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbteEnCRA9TVsSAnZWagAAX0YP/RJisjdDBwHLm3Flwl4c\nVvHVmLN2qWgYzUj4FJmO4phwHWPy40M0fUAAtMLoNyHbYJ2C5P4aVZ394o0A\njBzV6klLdsiwklNCUd98aGVVmBHhwkTs0xOd0/xRDjxqGiGGrxpYMWpbdTUE\n/AgeAOqME+Y0zDkrGgNu+FJzEb8/zcTkGDxKL/C+qJWrT/WIfOo2Q+CUHovF\nL8OV4SCmqyU3lr1+azCp5tla7Y/8ZcDmh1r5oNt7O05V0Wgk8TOiNH4PF35G\nCmsjevah+gUJyeTBAyBWHP67rLDfRdIn3hFPCJU7RpnOA7MdMdD/F/ZEsXrE\nKLI9pp0ljMAVggaEhFFwk19uKDWunhgYMwmjsaQM8UwRDnHpX1syxa2/FsaP\n0dN6p/Y30Row4dXjwBfnQjCK4vXK6/UjaXtXwGf8zC+ZdciWvGjdhayXxNXU\njcYbzEP41gfdpyaHhyQw53UkXjfrDFyfmHI2M58JLz3kVtuCJmu4gviceXfb\ne7/vJHEjAS/mQiO7U8gamZ4PKH96IzXwbkjwagEBu8egGyau79b9VcAGn/dq\nd5afDzqVC2V+E7ZB4LfRcdSv4Z+03XUnNkrGVdkMj5eTv62Q6UoAVdbRU/sJ\naNuM1XKan6H6ECyxbBmfIZkN5lsINYRJCmdOc8iX0+ombeHmIu7/0GH+VN46\ni4R9\r\n=d7dH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXlhIKyPG3J9iot02EnQhwR9L9u6+qCJQ1zEUuzsHYNgIhAOx50OJVJjfI9CPDBK5gs/L1QWnjE/J5txENAPKUjMGZ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181004094259_1538646311270_0.23651523445107414"},"_hasShrinkwrap":false},"1.0.0-master.20181004110322":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181004110322","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180928123454","@atomist/sdm":"1.0.0-master.20181001194516","@atomist/sdm-core":"1.0.0-master.20181001163656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"0e2e0539b4f6501b96e61fa7af57199ee13ed8dd","_id":"@atomist/sdm-local@1.0.0-master.20181004110322","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-YiBZv97ptBAw5cCRKrq8EH4f9FtRaS0SXtobed2Sg0qBOw1OfQafXchtVrbn6rKsCt++OQkU5WvtPu1A013DAw==","shasum":"483f29c1bdb89a94725a7d2dfb32bedfc0166d11","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181004110322.tgz","fileCount":354,"unpackedSize":1175237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtfP3CRA9TVsSAnZWagAA9/IQAJ2v9MJllZcZkECT/QSe\n4USgEplwLEatZL6bXla9NoVpuYKCAteG7z6ZvufaQCbNOSQ6y3EdxHbE9RiH\nh+JmRX+nNACgfs5ThSf9pSDccmjRKX5B+RJzlErDhi7zm2sKokq17CIL2ATO\nYhsvAUq3A9htlq1daiwRF1O8UEcC5NQRhK0+PWX1d3q/NjEfOMWzJZTGfUux\nhqEkvxOCjWQW2M7NOPhY8TOAtWKpdlEw+zf4RGSp2v2tPLYbDrEHlbybjQEN\n6F5K+tBbKsquAOjX488oRlX96HRHtW7qyl1Za6oIykXbYVGRrS/bCuGYcs47\npYpR+36vQT0sfOMjMIZqIOGHOxlZS4Cg0o9IGyMT1rIwCpzjyhGr/kS+YKS5\nFkt/pcOMv82FqHwc219yaV3Ev2cF3t3S0aXsNWRoLYPWp8qANDBE1E/CMw+n\n0APdou61vgmTzhpnuMzisUWFfRBvj1psnMZfIwSEaJekQEEGKvGtSPAlvo/x\nGcjNUh3jZWtmJn4kr6N5cVsUMpjhRJczFKVLyeFmiHFW9mEH0nvXlJQ4qFYN\nGQcU9hCyLxf1miRj92Et6dj+NWTgDmcFzVm3Znsh3zcYrjHVB/2wJv2qPKiR\nqoaN2W7I2GPdp8v+KwPvEaO8VK3jcJwNmP+TXrOxYv69/uv260xGOq7dnGe5\nSr6h\r\n=EhvD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTTorSKIbJdByt4Vj1HtYols8y4zmOHlBY5NmnxlHwUgIhAILfJZUQwBSF6UDO5k2qzUgD7ByoRlXBonyIRi6idvDi"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181004110322_1538651126921_0.7851996057001098"},"_hasShrinkwrap":false},"1.0.0-master.20181004162740":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181004162740","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20180928123454","@atomist/sdm":"1.0.0-master.20181001194516","@atomist/sdm-core":"1.0.0-master.20181001163656","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"33f54d3feedffcfbaa44991d08bbb5abdeccfef3","_id":"@atomist/sdm-local@1.0.0-master.20181004162740","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ESZzjShJiZM2tzxTykkl6aCB1GUM6QOjdxebZ+vPud7WnqUJycUcdiUkwI2ZGKZNStrmZ64doxVfSwMrPAoycg==","shasum":"9c4906bf54c3108ed6fee6e3d07d25c6b6174a17","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181004162740.tgz","fileCount":354,"unpackedSize":1284152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtkAZCRA9TVsSAnZWagAAlWgP/0kM90dh5xKxfrMaDGp5\nl80xa4t5lfxAIo/S5c05lwHtXeXIRtniZF3ATEQeK+YU2evbnSEEtiOnQU0+\nxvEAYoWWY9l2IoXKI3RO+P9/MfjcKkJvLFvPtqGF6++1DXvgtYKVR+mi2b3b\neR45DBDaglS96rKPsOi45330MpmtMfnJ8u9GGCrGnnjs5BludhwfZI8Y3GH7\ntZzLYjaBHCVI1UC2/fXmyEvSCbS0m3FlSiSTzdjUSoNfvlqJ7EmvIgVQ2InF\nxCFzc7BMFphxQmAKaY/LPpkxzDUDdEi/0hE6iDqhOkuGJk05KPjOGNpaQZ6G\nldYYCiP8JW8pa/wZTCIuYmk2jHW/QKiIkAIXibVI+nQT21DLs6mJiYEe2lnr\n5sQRtA8/RRLr3qKn2aoCyAQ9tY9AlGrBPy9VRccz3U9sqfiUDky2i7tn/2dt\nlT8JjKYV50BG+QmMBprFdVirt0+NHMK0bCxYNeBMhp2TUxQqYWz0SjgiHPY3\nVGqoJO0ZROxn9RNqSywoUZwrVX58mh4CdfaTSN23PYRkSVYFP/Vj03upn5ve\n/TpZs6wKnaIjCLb2Rh6muxYynq4pWzSz+rmiBkDv3FUHeHZ620KekeVbxQ9K\nlY5Lr7QHU4gZ6Oihp0jdirdLnU9bQDD4/xVfxgIHp/jvc5wRNV+aXMYjwZCG\nxjGw\r\n=uQjr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGPcvPDRzwJ1sRmYt3EVI8y6haSaaGQozGqcyxbnIqb+AiEArLdWdZYLfK9UwKKXqGixwojQEUyUb8A6YPLm1ESqqoM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181004162740_1538670616445_0.1570396773502012"},"_hasShrinkwrap":false},"1.0.0-master.20181006203556":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181006203556","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181006002158","@atomist/sdm":"1.0.0-master.20181006100238","@atomist/sdm-core":"1.0.0-master.20181006194507","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"456579c2d9942baeaaf44679bf9e8fc985b8ae4c","_id":"@atomist/sdm-local@1.0.0-master.20181006203556","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-R4ssCn9jHe83moBMwpSX6IyYt/bYHc+t43JLkHmBRU9JnW2A3dzr9nPvK1ES6hOXfOKZqGof5J3Cqv8FeRpMGQ==","shasum":"81a28c1f145183edba112ad54e456482432668c6","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181006203556.tgz","fileCount":354,"unpackedSize":1281999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbuR0tCRA9TVsSAnZWagAAtuUP/jcsh7JJUJ6qxoJvh++B\nXvTe9u1hJWJVq3w/ZnFQohmjwWPt3wYxJBHs2ZY0B1D34ZXxlLeMKrfCT2OI\naGcUPBH+DhzoZMB3tzaMAnHg89GAZVmmRhHyf0fISrEP1FhTmEISZEqIb/os\nN1zxxjnRpKfEDH+wiY1qlyI9LCK41QeZ0bcTYoq9QKPealD89hepJw9gGEC7\n5XGxVmCahTZ8U+FXSZaoQHqbdvl+WIUp5I0oNkdVWFLGnlIfm73frTSFIs5m\n8k4kJeHxk/5VPYEpS2WmSltTuXXqmG52cNNPmym0jeVX926cT6eMXiJaeizM\nE2CDohfp2H83SF3NzfpzEsIvf7mcGSdv0GLVtBIHlKCY164TFRemWj5bYaqj\nI5j2N894HqPPthh2qnNy9k+bdk/g7IDIObr6QDDiM2tcnt85Q+z8Zq3UqOl5\nmaIg3AmFC1qZZOtLcBdJmEb9wSDHlz1xxsoVfAyDSyAmMkeifQ8GIhDcf/iz\nLG1aCw9QWut1UA5cdjAOaMrHqEvT5StODNlWkzBsfOX+l5uf9WZ5mnyQUBBP\nm6TWAcn9zP0uYSoQIXBB1NsQF6HlOUdyRBXPvWXek0fLnMOC4/Sa05ejrkVp\nk+J8oxmiDL0BvCmCtzyYGgyQCggc+PaIsPh3slFG/wXFauGgwny9JeB8gny8\nNANN\r\n=G340\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuHcyXoZDuuBFkQGcA916gSC7tdxya0RMKiTOEISTcUAIgao1lFjzKlvBF/8n2lQ7Y4Cln6amypwPD/rJhF3zTdpY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181006203556_1538858284687_0.5619950817505208"},"_hasShrinkwrap":false},"1.0.0-master.20181009145826":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181009145826","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181008113855","@atomist/sdm":"1.0.0-master.20181009135628","@atomist/sdm-core":"1.0.0-master.20181009143145","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"2afa82bcaef8fb74a3b3f8bfd07f306b84dbd8c6","_id":"@atomist/sdm-local@1.0.0-master.20181009145826","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-dKTepgflOHVrtlZwywmeI7xwBp2QgkhMclkciVoVNFk6J3XruoZ1T3i83BWrA9/DOfR6ULmmLbzVbeE8BoQtQw==","shasum":"033cbd33e30bfbd7c9dd3d0ae6c18ad8a5b897b7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181009145826.tgz","fileCount":354,"unpackedSize":1282839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvMKdCRA9TVsSAnZWagAAnkEQAIo3Ew84lOzhKWRxBLmv\nTod0TGL4qLzucUm3PvXm8vWPYtNMCeMRfBguu3JHvexlWKGsmRUGOkPWO2CG\ncx7my+7XWTz+kJp7dAQU4DWFWMgzEF2FlcasxHiiFVDyNg97iVmR1BHGQujI\nzJCey7GOGlXMHUUatdNpLQsC290iRxZ6RmeeaCbN+jEquETREl+fm1JyxFRy\nAEXEc5D2X0svUtzx1uUKDqqEfJmhhwJugl0H5rMab5lOiD5uX7GymkxB1zYZ\nkz6S4vpzEjqYMa1gcmsfzu/evUffxq6Eg4Q5CHj4G75XKpP9wX+Z2cbt7g1f\n455rmFdaE+D6h+GDxKj/SjaIYBso4jHLTNXQto6LG/obHjwNNhVntU+eVq8K\n65x8F4WZCTxIM/dfST9EFT3D9ckPoKCRDIgZhlQcQ3lKSV72oYmR5hU1fz1+\nRRxfmhyOwXf6JB8oVwzIlNjjOxSrCL8rhPcvAmA2AdePgi6RgX+NQlGjLygh\n/CvKA2b2oStdzRTR3GG7iSSzMb9Agz55J4yHHSEhdlHcnqr0q+pila3UvduV\nCyKsPIuzK8iriJdf4mG/462EFPuR4HDnlb6pWeQ7enDmPZFvnhHzjhhE77TM\nMlKWVoWDmQwTtKNwt6UUlOdFOInH+TpMqJOQfGb4r3hLI+hK36uE83FfyhL8\nM3sI\r\n=cXvf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHePcl+eAHd6NXn9XhMyw5qSMpL44waVivQamO3pzGnuAiEA/HHKEhDbWJCMRr48vyLV/qIJqqfgGJJK7iRl0OtWh6w="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181009145826_1539097244446_0.45669853381788506"},"_hasShrinkwrap":false},"1.0.0-master.20181010083836":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181010083836","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181010081045","@atomist/sdm":"1.0.0-master.20181010081849","@atomist/sdm-core":"1.0.0-master.20181010082939","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d03165f22f626d8214cce03ea4f39ebd8dfaec04","_id":"@atomist/sdm-local@1.0.0-master.20181010083836","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-TPSfp8a237fqYZGRC74bjcIvNEnZj8gzrBRWwhX4fWrhUwZehx9SOrVdMbR/2jM/BneBkIyYf8x3LmKudLZmBw==","shasum":"b9b749d782aea34d2b5a197acccf099fb684cb13","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181010083836.tgz","fileCount":354,"unpackedSize":1284726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvbshCRA9TVsSAnZWagAACjYQAIZRXkBw/RcHQYapgAOX\ng4xyrVFhqCU/pBS2t0UrGBunK65PkVON4zsyr6HMZjYCs0EOF8+5mS8O8iDl\nbFmwVeBjGxO+tpVudNwvdi399NKQ1BTDxHbqj0CmCEz4AMFqn1DaJnmdPAuc\nrhne2S+ZjSkFuX/XFkyRaZCmGKu4bqxrTpAG33zSe1Je3AAgfHQL13YAslrW\nKdL0FBkKBUZJzJ8Ld8Mo4PPAY8fQnOR24IvFqWNTak8JG5EPcGKtgldpIFgr\nbPLjGhxMaqMsQPBIjJ8O0WH6tBA04UOH/hL5DJZVmYbgIKkzMxp+k1mMx2Qu\nYceGe2ln/+Pscz8dY4cUqKLo7U3d2NwrZcYSifd2ib600ObXrEKr3xJsN1TY\n28KrJ/aLOvFcvUWRvvCTUhRTZX0ve0dRywXBx4sNlcbsy6hzFDh80n5GdBqN\nqVEIamEJSCDm7+2P8Helf7RFlBCE8rv+cX77JPJoKTJJ3cOocuH+fiBiCpkU\n9V/7P+S6t292tpKZXza+h/Is3u3Rn1QRB5SfN8hPQND46nJUqB2mMYQkdNU0\nwx5hpg/PN+2LFFdYUJX32dR1d7dLmHbVf0+hUmIJ5fedN1Sd5yzSYh28DzXl\n0yaBHejDS+/3Dup6DDctTxdnpaKDt7a4YDy3/HVQWHjxorjYoCirHPi10hCI\nIM7X\r\n=b2Ay\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICELP3KL/fsp/n2t9n1ybgmXfPzmBXaWSgbcCccT9cdTAiAGQfn5nRnX83Y81IjmwbnxEH1ELdEI1TbfA2HN7STo7g=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181010083836_1539160864772_0.12028805892758365"},"_hasShrinkwrap":false},"1.0.0-post-commit-stdin-210.20181010185217":{"name":"@atomist/sdm-local","version":"1.0.0-post-commit-stdin-210.20181010185217","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181010081045","@atomist/sdm":"1.0.0-master.20181010081849","@atomist/sdm-core":"1.0.0-master.20181010082939","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"7217854def02cdb6158588d573583fde1028fd91","_id":"@atomist/sdm-local@1.0.0-post-commit-stdin-210.20181010185217","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5p5wPsBsZiwHcQJ32E9At8FG0Erzzz9xuWanpciw66SvD/dZMghVcVfDj1hWWfLR6SGSipiO5W68t1RreC+qCg==","shasum":"cf315c6ed5c349a1b8eb2bf8e2e844a51a192e88","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-post-commit-stdin-210.20181010185217.tgz","fileCount":354,"unpackedSize":1285313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvkr1CRA9TVsSAnZWagAA/uwP/RSSaz/pCaAFCSAMN+eu\n22makIyeeTa3yV0hA2v9KT2dmxadSoqi+PGpYMCEvIXPUe+fvy6/3xYP+Kg+\nqbq3Tb2RhHiqEKohFK9V5FQruGXiahzPw/tQremZJhz/pHVzzuBtLPp34N9W\nQq0Sequ0Vc9KBSxrjLUJ18iIdqiWCXlHV4Bfbqn8xesTLbsp7IhGmY9PBsAM\nt8OUFv3uHboCiL/xFXmS8ZcZQCOzuQkZDcwQACiw773ihHheQC3D6P35M46P\nP6vaPvjjtDwnWQBZDKkMoHhhmauhDR6pptWr/ayFPSMymY1y4kEbsAffsebH\nUwqEBAKvSjSjq5vRtnRYDYwXgFmCDwse4drqHuQys2c99xlULlsb7/l6ONXH\nh7rznMhdGyXE8iCtDEHl3Le1VH8BHDyGXDwuKxrk2EvW2cOBtlmaAnGMTb5c\nItp3nXnDeLk9Rc1bTjAXzQiW0Amfu9J/eq3So5Sgt74iFzyz3g4xIOp28EkS\nsMXuorbIQ2mIdPbt0Wp13rII6AU12mGeek1mJ6MGxx1VwR9cp9v1XPsq8PEi\nhj6jejkYLKWft2GJnaH4Vc/nvm7QbD5wjmfdGisxwLFMKDnNoequ0xZDe6KN\ndKfo/g7cEIqJcFArjFfAoI6ym4wMkXtN70mT/j6iVAXi7rk6fUz6+vBkW0Tt\nUahv\r\n=uO5Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRomhuAb3EwBqtMAwFl8zTjPfrSOpytnlerbnjiK0tcwIgNENsSGK2OWRjTD+IyhJLdrHi7ezOF+buuJw+F9YJxPI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-post-commit-stdin-210.20181010185217_1539197684629_0.8763729816739922"},"_hasShrinkwrap":false},"1.0.0-post-commit-stdin-210.20181010215353":{"name":"@atomist/sdm-local","version":"1.0.0-post-commit-stdin-210.20181010215353","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181010081045","@atomist/sdm":"1.0.0-master.20181010081849","@atomist/sdm-core":"1.0.0-master.20181010082939","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"880db53d5b6d7510d547512fb595336f64e4b804","_id":"@atomist/sdm-local@1.0.0-post-commit-stdin-210.20181010215353","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-9RNyXwL1MwfXCoGDwHpcdXI7ML1RJ6toFmoD6NcyEscxoYRmfqoN/0NB0cpi7d0VRxwLUfjwSRQAsHTNPgYvPQ==","shasum":"f3f30f196934e7bc6da7ad771e410105e4af1326","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-post-commit-stdin-210.20181010215353.tgz","fileCount":354,"unpackedSize":1285312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvnWOCRA9TVsSAnZWagAAqokP/2Hs2Q7a2NlWf9TGb9KL\nN88GjJvwnt4ruAoJPQyw2DbuavHbHxv459eKVqMYTLtxBHa70T6gp3ltVX+b\nzf/NKazEeAqqtprmuAlqtgVesw1XEqvC3NqGSfWEdAOoJ4yaGDae1ccAvJyL\nXL3tOacFyev+a8TIx9RWPRsiKDkSi1sI9zkcpaMk1wJT9eJdkBLmLF6H4arX\n6rRiKtpjlIY0NQB4RWp92yX5JL/U6jWJ3yVN0nYUfSwqo1VnjLh/0fp60aT1\nHCrq5eHu5C2wEl5UG/rzhSoIcEhanbWXS2TWIgJtG9Ck4fHZojLARWYOgpUF\nmGTAiApFoe861PW++a9JanHMaSl0rWJEftqbbIcCC46AXSogH+DJYzua3o03\n75jTfFlNRRw5bDn+qNG737w4O/nQtKlrrYVdWV4GF8rnFNWG1wgPiGgrcWun\n+ms8QlxSSQuOj0NkkbvHo8XmPmKfBkPXRCCTncKw8ZlfFMKhnqmXsJSmXF17\ncUeP3yFPjPAS0LvNaCnlmOhrHzVAyijdphU/0fO0aZYhSp4ZfMOKBOMdv6kI\nrkZ6p41gDcXfpQWMTk7J+2wGhZidRRzVoJyEXGOjdx2wyLonvXGWbqKd8sd6\nI85ry1kT7OIZQfFq3C8tsyQoGeWxv3x+crXc4sYTP0tlQc5KvOgm7XHQ/Z3N\nO+vr\r\n=5+Pj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpOFD61CENc5wq+bZdWMsfkwfdRDjpX4QkVE7D6DAXaQIhAI3V9wATPSbRkGaG+sf9fdf9P2W5zcbcyg16vNb9x1rV"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-post-commit-stdin-210.20181010215353_1539208589098_0.6657456082633633"},"_hasShrinkwrap":false},"1.0.0-master.20181011201306":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181011201306","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181010081045","@atomist/sdm":"1.0.0-master.20181010081849","@atomist/sdm-core":"1.0.0-master.20181010082939","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"5121283b704e5995680472b8805fa3feace1c5a4","_id":"@atomist/sdm-local@1.0.0-master.20181011201306","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Vvv5e9D6pIaFN7m/CZ7/b8ne/jHHB+bF7s1fKa2y8eEBsgiqUseXMmSaTlcFI4zSFj8AxwR5TtiJcWvjMSPtUw==","shasum":"8032e9c262270bca39b14e393ce3a26273d766d0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181011201306.tgz","fileCount":354,"unpackedSize":1285416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbv69gCRA9TVsSAnZWagAA1ocP/0X2XahdUPUwK3L4EUrT\nFBoxb/wFToW+V2rdzlwr0xhmsSjCwWNUE+5kSjdiSMxJAG9+X7YUFrw7meis\nbkRfhPH64Tz3iAb7jozrMr5FUjF44l7a7DGu1lQTSPT9/5ACS21YHHDCQvgM\nZwGwYOnVMd87jEN2ICTh7YDc9VCkEbunREuxQhc2MvVaf4JFOO8f6wtGC1H7\nzThxdD/fqYPylfoR1co2CzG9IEPHJFVnnhbbPTrfd0/fybKvms2fjygRXYCU\ngGB4bjfMbPOJsv/+R+jV4eaCVFjj1JJ42ZnTjAWwyuUISPA5lNXDSqovTdKv\ndJJFhikpkzLsPRoDv9aS2EmfFkyLXab0jeRlv/NWDYMAo5mBDzGUqnYMMc7F\n0ibEpsooPtFnGFdwi6MoR1Mjw3JDkD1PhP/YusUx/e60nHLxtaUeO9fft5aA\nUKg4bOU1qzzlxduIzk5yShhSt6iMsGsWdZBcXycIewgFnfDAhqCZiqFp1k/a\npmEDtz3foRXdddhgVxAhMQNvzXTsfPjjbAhSey+Q+KFgFLn+hdn8l4DOAfWE\nN02TtqzKWGg3+hDq7fR0SvNQh/i9hg9XIUc7G16c4xpDuL1xY239o/+Hsfy0\njaAVxhnJrncfoPtt7mxp5WKzW+eyV3ruvvs7/Z0NykJ5T1GK6Od/d2L5B/9x\nb7Ij\r\n=7+5n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLBJBK8dXb7o2WQpnh1IOAD/ZGHNb/c3QjXGTo5GU0cAiEAhpWmV3OyVsrx97afWwL342KOL8QHOGtkFyqSzycypBM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181011201306_1539288927935_0.952670499768085"},"_hasShrinkwrap":false},"1.0.0-atomist-update-1.0.0-RC.1-1539609209011.20181015131958":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-1.0.0-RC.1-1539609209011.20181015131958","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.1","@atomist/sdm":"1.0.0-RC.1","@atomist/sdm-core":"1.0.0-RC.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d0777a1b7c4dda1697dbd1337a24a98d2e26880f","_id":"@atomist/sdm-local@1.0.0-atomist-update-1.0.0-RC.1-1539609209011.20181015131958","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-27HuZsGJTNhCxhyRiG3QSv4n2rt1fWHKiTUodwUd4Tu83FVzvqzwAFBXIGmxkxK2917jpqLPmU2851tcxJOFVQ==","shasum":"4dff056d6b0ea19273be8f303a49b855557cf397","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-1.0.0-RC.1-1539609209011.20181015131958.tgz","fileCount":354,"unpackedSize":1285338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxJRjCRA9TVsSAnZWagAAQ5EP/ikkuFq0i6j+j3XMUBUa\n41W3ZXA+hEj4U0EnczkK1fkp8dnVCb3haZNDFX/aXtBTk9allb9OvSYwUYAw\n8JXReNo3hkhInx1+Y2OmJxwxYUVoJrSPh9SEX/08ddTHlrl7xMircrkG7p+p\nOqa/E6/0bD7sHWvVMGh/w/YLYYYrBfsCKJrj3bHQA+g0vkCiGYniGOP4uj5W\nLW1HgxYITRgQnxEZbxFmdeulqmoYh8PoHK09rqtUM7mcbK7ee3By/uRn+sJ6\nPj1Ff7vj83gieYTCegZvgVg6WHbdD9/1vvsiw/wkmP5HxZ020XCAqERRe3Ar\nt0y8zkkl1c2EGRxKzjfMAnWIaBOht/hGi8IRt/8iEXftSZebVYRP2Xy4J3OD\nHfHmr+vB8tz3wnEZfoU+3CbMVu+OTQm1UlGYCdetOdrpki2WjysS1qLbwRgi\nutldGQxH67p9gQapc1ZUIeAy07UC3Xk1fI2MVGc/Ruk4UkkubnvCYl1ayxog\nQeKgrYw+a0eo/VhG+bBhmSFSD25FCmH0eySGKdC4yQwaezsjOPn+2rNYPmIg\nQrBo5qVc7mt12nAli/QP9wbJGWPKJWflr8i7TRQ/pPlCC41YgrXwX8sjwwmI\nNYOS08GllUBCZEHhdRv+gibMpBGwheMJJomM6LOzY8rcx5WQcLuvnYntLw25\n/LZF\r\n=O+rq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCd2Oji21YeLlQbLZm/Tt9SwfIaISIzUXsMz2crJf5NmgIgZQhp5Z7mlEz4WPkvXQOgFIZ5RFyBrVG2a1hAXRLJxm4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-1.0.0-RC.1-1539609209011.20181015131958_1539609698746_0.030168232810713347"},"_hasShrinkwrap":false},"1.0.0-master.20181015132422":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181015132422","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.1","@atomist/sdm":"1.0.0-RC.1","@atomist/sdm-core":"1.0.0-RC.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"271ec40d7e35ceca31d49880cede9a6a7a4a92dd","_id":"@atomist/sdm-local@1.0.0-master.20181015132422","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-F0GYWU67F1a4FICY3pjln8nTOSkimOBsf/EbATckEHjPITLg7z5u/VhotaCfPY16WFnyA7Qb52B5fETNC6G8NA==","shasum":"29b373a18078a52029eda52da7a028747093f0cf","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181015132422.tgz","fileCount":354,"unpackedSize":1285743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxJWFCRA9TVsSAnZWagAAruoP/R3RrWDUCHnuk4F8PbGm\ns2ThaZRp9vF4AhlpIDS7EJIDMINgv/Kzn/Mzbkqg9pSba2l3jJf2tTSDD2nM\ntz1Kr14b31gS4YqBKmOjKJOINz5kt44qA8U5DfAk6923wrZI9vCT6Je4lZ3T\nQ1cZfgeqltu+4cQW9oQdk4c+Kmq6nHysVDIvdRCsI+IjLd7ETcVSr7Nfi8Er\naucDqIZVGBfZCkNPISOUff4n4QoSJXmrJd6LeYQHo2/tRBF9BBUy9d8Jn+XL\nr0V82fzNqWsWF4rHUtUq++9/ej3P0Hdpf6cRQmF8brR8MOFkdLh2kbZzIgB3\nYgrbCyWRVlm9YirPZH6rtQQuqAb+UDQKGp0r2PKuB37B+DnCPK3v5sgQ/zU0\n5Wv5m1aQJDFeSMrnmQkfFJ5VqzSqufhJMOfVRfVhrrQAIONOgo5L4N2XQeXD\n+vqbKvAmPNSZsNllvEVPHGZ9SdqTnKVeWv0vmdvFYLUTlp9HBgDpT2aMQnBr\ncTS3lkgyHdN+/2DjnEsvCgY/2VmR/Zmd5BfXGZxtpp0CaXDszYnLFqjOPvJq\nOghOJjKX4wAYntiwnV2d63NLULoVwCR1Gzevqg/Y+kbTttTBEpL40fUvzCJK\nsWwyxkL9sFoiAaIvK/LbHnu9YOi/FjUFVWVQzrXcI5Wfu5zi2kkgW7xm/YOP\noBDF\r\n=ZOBd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMuMGt/OZMN7Ym3vjlGidp+2ZTvfZ9tVIq7IEa3lPWIwIga1migGEctK9K8YbG3LatjQoREH8BSE/hhJ1qZJKV9X8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181015132422_1539609988866_0.35220533766493056"},"_hasShrinkwrap":false},"1.0.0-master.20181015141737":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181015141737","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.1","@atomist/sdm":"1.0.0-RC.1","@atomist/sdm-core":"1.0.0-RC.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"9dbcae7c2fb9c078455d3f010c8fdb475a74c8d8","_id":"@atomist/sdm-local@1.0.0-master.20181015141737","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-nJ/RxlWgtrOXUBySOyJG6Pc1dEq+1Hjs+cARuHOVkb4LwNsKdVyYRMm3HqbK3hDs+XwUVm8TYlZfroAiDrtNrg==","shasum":"0b4ed16f1850dc88a37ca9e43546fe1ffcec607d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181015141737.tgz","fileCount":354,"unpackedSize":1286875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxKHqCRA9TVsSAnZWagAAdk4P/A5WY7LGSBHq/Ss2ucTS\nU1aDh3Xsn0hTsRpqWDJaMVbqIz23EMWrP8dGR2Ap94vJtnAwCrxXBCUmcoCW\n+VPn1pyeZ1wntWwIjxUprsOlGLWP9b9wiqF8b3DusFPB8fkahjjOZuNyNIyD\nNvY1aCg7cm8Vp658VXrDscsdzjfLlT1UAI/ClDHd/WRG5Z/9eo9OpIOtnlaU\nYqcZn8/PrI2qtWg7VHgSyObAlIseaIRfPEVmgZ4nCtN5BN8ZZzIDvUdNPs4U\nMMEc7WdclWStW/dfhvjYz8TEjIrNy20yWHx27zlylgk/c4D3aR216ElCGeaL\nrKCYR1RMX2IUyK3Vzm6yfyQZ8AobvwlC70bVgiwSs1YPaSgc2LOtHBoPngjy\n5GpxhAPrYeGvLpFgt6+LqJro1eApLrpNksZ9ErmbEuuLke2rrfaaBwougoYd\nGq87hIgxH0um6ZasTgPTjz62CHUngu1rXfTLHgs249CpL83L4b4b4/+rhRI9\nBIouybs4vKYZiMO2LB4mY8nn43qGMGvYWJ2hAOtdSrwxgBYvMdfzQ9CxR7mQ\nQZsMOXrUyrlCvx78HbkJQ+4Eii5G7gxidDHN1YauIUVnFvMBNlAaeRL5q1Kq\nDApS51ryCh/ma4GrpN8yJxYxx89R3wOdVsiQqwkPaCfaPC6tgIIKbwZUurfX\nP5Kt\r\n=kR8W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZTnHUScb1fFD4E4d7fY+Kpv9c3DU70W6FyoAWMtNYEwIgMRSSjHeEOxKG7a+VCvbCDPRjxfdmDFX5mi9iZ5843H0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181015141737_1539613161674_0.38394193449124026"},"_hasShrinkwrap":false},"1.0.0-master.20181015142512":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181015142512","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.1","@atomist/sdm":"1.0.0-RC.1","@atomist/sdm-core":"1.0.0-RC.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"cbede1c1a3dd21f62e04f273e11aeda57a565de8","_id":"@atomist/sdm-local@1.0.0-master.20181015142512","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-KPMm8tdzMIaE44xl7G9EBZHiIxBlfZrlsorUxzCzPtaf3WpaOAdzMW3S7T29jL/hXZj7iQ6DrkgQgZ7NMIbCRA==","shasum":"c01edd481984ed980daf8e23b5afe72159e311de","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181015142512.tgz","fileCount":354,"unpackedSize":1286875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxKOzCRA9TVsSAnZWagAAXaEP/Rtm7fjd9H7VOHFx+JyH\ncphcM7O5sEgW1xWXLFQ/QJw8chy1jLSiTMSjZhN/HFs2jeCpLZYvIvcud+aQ\nAffZD1WWs4xJydiKYtJ4kfPYvABGQv/oHWD9L9y5PSgu2fFUDFzi/3v7UKV7\nzod6elrE7y62gYgcsj9bu3z/3sctAjQj4HJhqZ9SFzzxbarWFc3QBfrrhbir\nOrchbSUt+5OIf+3NTf5Tup7nrqusgXyWsr4Ssrb8kH42tBMmTealwK+xz28c\nVnnpdVaImz9Iw++bkEeT4n2XVqIDbEvJwOetI//BFa3dCw+4PPBkBI9fVGYo\ntPqM3Zpo9gjNsaVjvdAF0bY9IaBs88oTsORVZS5LXRkXNMCvdACeXm3wg9hZ\nr/ciBWcX9fokNJLG3qoHOknigB5BSnSk9aLDyQtDcbyWe9pyKTofJ1lMfsNy\n5ToKTYnjei8PnV7NPtIdLdJh7z/VaQFBRO3Pl/ySRoPn3eBLyCEgYCpyTzth\n6mtHHrbq7LPk+JW/jZSjvyEmeq01NhlewNAR0VaNII9tJqLGesQ7n5IjXUUe\n7sTUI4FAf15ekNTuvsJj8WL2Bj+r/88AiOvrKR5E4pba17j02Z9VCbsOTm80\nGreFxKj+ts1rdIG9sQDBMIecR3GMqtH4ZRoJ06dMWnqn/WltpCSMXOtBfrYR\nTLt+\r\n=pDuQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDao1PuvXo2EZCo0dIf4RNKAIgatiVjGfobzqNcrLgmiQIhAJagaVQMmFHrt0XyLIfL5GuZClAODEiHhfwwpJRquKp7"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181015142512_1539613618729_0.139349076537562"},"_hasShrinkwrap":false},"1.0.0-RC.1":{"name":"@atomist/sdm-local","version":"1.0.0-RC.1","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.1","@atomist/sdm":"1.0.0-RC.1","@atomist/sdm-core":"1.0.0-RC.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"gitHead":"cbede1c1a3dd21f62e04f273e11aeda57a565de8","_id":"@atomist/sdm-local@1.0.0-RC.1","_npmVersion":"6.4.1","_nodeVersion":"9.11.2","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-4Wg061e7WmMR37m1w6JoCd8lz7Uc6ExIMeUkoytVSIjZGMRq9jfk7tLzx3KmnN4Q3WlfTpxF1GJHlImsNDqTpw==","shasum":"3e9463ce497b20fd0f714a69f18bc558ef3152df","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-RC.1.tgz","fileCount":354,"unpackedSize":1286858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxKTyCRA9TVsSAnZWagAAWIcP/3UdFwloR50VDsyUrmpi\nYEalVDJqqA+ZUUsNV6lepIGh9ISk8QGmsIwkMsBk0gdHD6D+bFrateT6Naac\nJTNTTexFFEPtFn2HQE8ime45T7pxyCkOWgFXrXvb6naBlXqxYNfdKXEHiivC\nMKlQsq/xfic6aFyR4A/Tyc4bK7L9AQV3gIn4PQ3cFO1J6usv+ZmHWa3NVFob\nYPkhKBe8YkgbABtrUYuO5ccI3RJeLz4ohQwAKq2YLbgA/bPDue6WEozDc0Qb\nNcpxFqL+36Zvoa2yN4/ufLp7srs47kMZw2UC+2CW1JK4UXp3MyhDG8lc07aJ\n2Qc24Yi2zX75PxbqP3rT5/X4/vhuQhRor2TrcMuFNJeSuaPxnacXZInCTzY1\nmWcaHK+OFn0Q5OMsb4SknDP/zSaZKNIt/6oaaTsMNu4FeBL9Gcs7cY9mFzBJ\nu9jzYkPBI/a21gdHiuWOY+Erwo1N+l2VLG0e62jUWUEG+5RdCRv9Fr5pIDzI\nTuZX1qKUPye77Qo+1Rs82RZjUQ4hRQ8YJtsYBZNgrOW1xlcGK+HTGXoHtpYD\nHlPosGCtQng81ZN9UtslmCuPegkBaaXHHdtxqvYx81xubrUoIoay8corG18z\nbW9oOTk+f2Hymjd5ljhAetQ6W91CBNiFmu/irGGzrafPaetCoof0dx32yilT\nuZKT\r\n=GRXl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICrHv/xb482WZ43uEn7ZTlEWNYpEgkzeeQzf1SEWoSmuAiEAqaW6NuBp+Sf1BI1CZmbNXgPc5ZssoPWBlCAwLHck9XU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-RC.1_1539613937365_0.10424916079448865"},"_hasShrinkwrap":false},"1.0.0-master.20181017153031":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181017153031","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.1","@atomist/sdm":"1.0.0-RC.1","@atomist/sdm-core":"1.0.0-RC.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"a5765f37812f696be1eba581ad22038de37c1cdc","_id":"@atomist/sdm-local@1.0.0-master.20181017153031","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-pchBQsmGqareuvizLRvNMfTe/nrOa5tuEhDnue7/xCrW2MfwJcq7C2w2QndJVB7VGD2ktaXQU3yobHPQpzQTWg==","shasum":"1fb9057ea53b3a86d0860920916f67e6dc469458","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181017153031.tgz","fileCount":354,"unpackedSize":1287134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbx1X/CRA9TVsSAnZWagAAJ78P/0gyLzTUDhyHDZYBqoY/\nZ7gAxjowTVIbaVTKAs+wEi1eKLQSiGTkqpgHzekq+5S+QY+5R3owMAoL//G+\n4E5ek7wlygAJTD/ufHRlA6u/Q7Qzc8dgZKraCCRyQ5igmkt18AT1z5ufrOxy\nrc7wIIp8/ioQB2rCSJfM8mz91ki4pK7GmKOoBig3Y0gKdLB1G925SwlITPbi\nZVUxvMTkjGFv6uaZ8737MxnUfWpo+OEUtq3yMDh/uBg2JA6MlLdLwEH0lReD\nB0qKr+l0wz4/Lxgk/uPmZDj0OanqzSlerL6chO7lBVrlBv4am4z69h+ombvS\n4h75VEhIfoqK5z7XkZNoWe2ODStB7WqAZYvFyon5XLhSRoKvCRjeTxcsuuRu\nVhdJyhJsvCOZs/D83ouznadCXErl1eF63qwGK5SLZX3wrQtlKCMeXVndGrgI\nFashe0lb025xhxYhXpcvO+0ZPLrvIjw5edAjhdRqqIqpEIF7fSho2rE9Gma+\nsUTErkNctQwAqM3xiR32n4Skif+wjqwp7mvjQrlb2IhK1B2fNZQerwtwqa/B\nqEQyURJrDeKY3fKIu9Qwq3PsD/EWGQEYYB8ZI5b42UstUTdrfM59T+QGRMQi\neX7FV6D9pPZmA9GWNbX4ZkBN28+SXhH4CJDz66d7qHK/BphRWOOka2r5Rk/d\nG2Lw\r\n=G+h8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICPiwmV1fEyu0oF6DeOfQhFQcn0GUb/K41me07jDpvrAAiEAseMgem47Fpo6S8w5m1qCyKnCYBVvwoLla16mt/Gwgeo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181017153031_1539790334816_0.47178675146185545"},"_hasShrinkwrap":false},"1.0.0-master.20181017154149":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181017154149","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.1","@atomist/sdm":"1.0.0-RC.1","@atomist/sdm-core":"1.0.0-RC.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"3e6254e8433e9531ff8f16c2c589728b94f3a44e","_id":"@atomist/sdm-local@1.0.0-master.20181017154149","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Us+WGikgDGXiJIiwGdvckFMRZrJqXUobKhKJ2hu4/hslCpzkVLYIIBRj9KAlIHo1J7mtnkrWpUVUCF0u7zyg5Q==","shasum":"37613b074a37ca80ec47ce41ee02e289482e9032","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181017154149.tgz","fileCount":354,"unpackedSize":1287833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbx1itCRA9TVsSAnZWagAAt3QP/jdrF7ToTUClNYNioxZ9\nRC8GEShbQcA1rqZS2ql35pW8fk9kGxPHjCrnU/R9t/o+GU/g8Oz+GYJFTusC\nEwig4ebkxhZUH2tHQXcCTohTeOBFu9lbJkLgffdOC+CbvL+YPCf0mfVtY+Jv\nvNPPiCysXNEPeYGm+wk72ZnlC6xNEjDsCfpfLPL4nq7TPeuOLZkwpAqO5Z+T\nKB8q28qCGOjBMzEPt4B+V8PsBpwxEitd84Et98k+zgkLvrhmTMs/5+dSJq+s\n1goNZDXKcOze+QDJJAcBHRzdvT/XZ/vmvESSIZ35vutQu7x5mFt/Vdz+7rf+\namW0dcIkJVzCxktRJlATEzsKLAoNJ/stMD4/T8Sg/eoOML6qiKwm/n6nDwcD\na7pLZmT5ATUJSYgxbkOw6EO0q3rCDUnpknsnj5l1fwwsFKo//aL7xfKLENxS\nYUYH8c7Cx5zrWxD6IqooJc20w7joqZCLi4NolwOrKuiSjJQzPkh6W1V5D6ym\nn7USzftMLVTYlBpvT4qjSUb2wvGMmBsIVmvymXdvw+dUEKtrZDP7ye7o1eat\nEWwDLYAP5+Gwlj/OGAqZQpAcDc6YvEF6md5OhiTJtvZFoGijZIg2vqswYaOv\n2eAqUH11E/CUcI/nvssBoc0Rn4clCnJWDVQLlt1T8mnLw9kd1V1i86UCWG3C\n/Xs6\r\n=ObT0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw6574cbVtccK6RKnPrVfOiDo37eEET4SMjgt5u3u+XwIhAN4GR2wCh537bOcuiAaDLGZOsphZQx8tjkUfTByuDZbo"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181017154149_1539791021032_0.6357154587563403"},"_hasShrinkwrap":false},"1.0.0-master.20181017154846":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181017154846","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.1","@atomist/sdm":"1.0.0-RC.1","@atomist/sdm-core":"1.0.0-RC.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"99487e71b02abda7965f3d0b92aea872959836ca","_id":"@atomist/sdm-local@1.0.0-master.20181017154846","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-zTXGYAC/ddtm4M1WJy/MzInjvUCoL5Y55D9HzPaC0ptwynK+VREvbLrrddR92umiLtERRc31vY9eTw+JWsEeEw==","shasum":"7a4b68e4a0f8793ff609f839d4f563ff31d1f000","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181017154846.tgz","fileCount":354,"unpackedSize":1287867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbx1pYCRA9TVsSAnZWagAATdoP/RY6aiJF2fkY9MD9gAz9\n11IlN4ZWqBNyoBJuTA4qTP9UY6i3p8g3u0R2xwLVzHisRqcPzblEyyXVEoRB\n7j6xXx39kNjJuGjsILIWGZIXfZqHlSdy+8gNL5JCXfmS1TENZxwkwAuOTVS4\nQx2bzsrwo3ps7ZrKpFuPWC6I5LZ8OpfeLVkKUhzA47bXZIrLLyOI7DdgGJ1E\nFYSK9b8MIg5+KCKwErlFs2tD7mRVbiK7SRDVekTCTvTQYB9MNfa0pq0aDhvv\nHps+ysRou/4msXydGLPYz3w4UvsALPaJPfXMhMrJD9viPNqljx9WxMWNwwB0\nqqQQO/Mlfhmf6noUBBLNJ791Bc5C985H3WJifHEog3CgjnVzhJ9pOzqPwwNf\nNWCg0TfwHcHJrdK5qYzJxRhOeE1fUbkjbfw8PLWvTUcklA4p8Pqvgg2v3p9B\n3u+Zvp15AcabJoFAGX+cAgTxzhoqaBdbDppsIruG/BXgoM4wb/DL3XcjJSbV\nrnct2W6Tr2r/EFGOeQWvWEDvvysGo1GHdnpTaHc7w6hlcKmaMlAwSGHe3i11\nyzCtB5ECizrHZ0ffaQZyEwN+HM6+glHMkpyUntFJCHbqvMndsKlhDmRZ462j\n5u3GfZ251aZa7ai5yPecfkXmXeqjjG2e39THZ+3M5osLgeR4+bO2dl5V5w/s\nEGBv\r\n=wov0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpKhPb6FEPgsy1K5qiGkPzeVckHMpM9lid/2yYxm9NHQIgc975MV2tYF3W/b38BM8GE4MHeRTj+/qw5I67zEkcOro="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181017154846_1539791447307_0.46503759021495283"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019102304":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019102304","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"123910d80623a63840105f238f2654b7b336935b","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019102304","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-XQMSzoDA2K8w0EVnkoyfGL8kx/u5EhGW9NDKBH32kwZ6fg/FFKQykE0yCt2Axn0C2HLdO5jmEu69E8UuA39Zlw==","shasum":"a0944be7a48f23a33fc209f40734a8c65f676844","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019102304.tgz","fileCount":357,"unpackedSize":1296740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbybD7CRA9TVsSAnZWagAAxAsP/R9VMxvZ/jLleSG/aXl3\nCqfb8eCGDgZKxvQohh21QzB7Vm93NlGfiAPESGw75hdqWJIALjguYWWvkEy/\nPrqIF+UJEm1kd/dq5dkRJ6bHIgrzp69iqY+5OryjhUbF/iDTV39ZyG0y66Gq\nKxTj+pZVi3ylcBcXGcI8jxr1qTpb+OgmKZvBNCSkaErMl0/vhRJUjusLWAPa\nQLrmEx+wuw/n1iKXgeLsEsG+eWFaoX9L5lOs/mfvBYh6TPJd81Q9TSpEgEGJ\nfSPnQRbBTKSVClYIOt6Yzn3d1kbBhnj+tBdoPmmVF6FA8crsFJeKNeDjc2AC\nfDh/BEy1QvBHuPMKRSs8J8RrTDwccCuOo9ox8QcdleBM0zffLhZdQkFOoJrM\n8dyUlBdFT1uRe1Un4SJxcoKOEXmFR2wITy3K/rvGSkMPY0Nxw8wmAZWZqVLD\nzDZrtYywlbWAU5bHq1WbQJYkzQSZhVfXYw+LKqZlNOFcpjuZCsaW1yL+uddI\n5rnO89qIAcGzfSGm7KgARqsHQQV6vi3oMwG6Bezu1O2rI96yQd21uYNFfwky\njMhyhDuzxYwC0Ulaw/fIqW73WBbTEZvtto3ZwkZO6Flh/gB7xYBM1IrGSLVM\n+TAMyOGbtGKvx53FYKLwbAubx7i9Q+IGjLFY1u3V9jdbXpiABI4Zlc+8g+sO\n8/8u\r\n=Zl6/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCE1VSeGRm325t4wMvMa7CUXIzYqwtsCf7rPkr0mxQ5pQIhANp8Wbtk8KFbKEob1ybHmKH8AL/x2np89PX6zKRcUarZ"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019102304_1539944698979_0.49791385619079365"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019105234":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019105234","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"851457a76e7b20f8b42536eb4a59326f0b3e911e","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019105234","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-1eTZaNh/rfZruNjgQo8WX1kPV96+EIb8YvhA3IYINPkVqx1bk/gSZWjWd+n1pOgkjYzIgTvWlWDbhmtqtsLpDQ==","shasum":"17c42a37c0afb78790f423e218374003bfe30cba","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019105234.tgz","fileCount":357,"unpackedSize":1297716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbybf5CRA9TVsSAnZWagAA5noP/jIvLPKOYmZz+ttAUz21\nmvOIqzljBPmaQ0Bk+rnScq8FB/ZEUUcxQF1jeB/kCD/xjBlZjFcc4JRXc7Gl\n6TcmUkmsvHNALIgdIvwOLqkdNVKTh6cNHXujeJRGBf7mEF49qXnC2DSQUESh\npnJovGzWjBjobtAcTli0koCowZ/CKVs7ZlN2qB3SkGxvRZvp4imYt25dNJrf\nrEIaqZf6sbXIV/ZQlF1ZAllBurt9cbD7ySoEydY1lIG62ivHGQ0YymAYKL9m\nyRCzdJpGtIJAyEF669JVp3FQ45AzvIr0RJ6JETPQ0Hp8fDmN6cU4qwDWEAFw\nUdudwSa9lUjHbhqSYbteQ5vYl37ZcfzwbLrlYZlHLzTUnaaXjozEEqXQrJ+Z\nwCYlXYmJhoh+EOdrvCeG77QUxpfnfn1ntcLjmFdtoTNEPXteF4ad/mnlvcNJ\n3dFVosJylVRPKUCYCJT77lFSQHataR/9Dec/o1CmD9I4QlhBsvRaalP4EI4u\nCwh/KFTwShQf2wRyuRsVhR+/Midp9bRL9+wF3AmN2gOWmOigH7MOJcVS7+Cl\nlmvCuID0R2zkEU7HPykCoT3n0KvhI8flPPZHbOnB/OLon9PwILFvx2tfhr/E\nvUeVLdGNu+9NHqg5N57Z4JedFHldt6tznLFNqHar6aikvEyo0Znyyj/n15LC\n/g6H\r\n=1100\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAWmVDDKwSH5bUCCKw8EmjJDMVkPNcboabixige4atYmAiEA58WgNHzqzt+9v9Ld61/AHrVK0c81sZ++TWzbiFhrZ4Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019105234_1539946488574_0.09590069616508612"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019143419":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019143419","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"851457a76e7b20f8b42536eb4a59326f0b3e911e","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019143419","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-vEr5fDtiCkuV51KI/zmoeJyVibKJ0tNBvNPAhLLl32pWkm66AQgviM0WVk8jaM1j/2jhF2v7prWobMWHjf4bhw==","shasum":"f99d196b64f083959830ae78d40b60c5de2d8eae","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019143419.tgz","fileCount":357,"unpackedSize":1298079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyc+WCRA9TVsSAnZWagAAT40P/2jdqoAQ1SJDf07bWHlH\nbejnLA8PUohd0RGqy5dc8beP8oO1Nl3DotFPUYGKti2A8GnThuDw3Kl4DA1V\nr1XU32w94Tk6B8QY6xDgULFIQahM+FS4pMuysJm2heiNrsd38FyF1hM0RYYr\nCKij1me+2wPn+CK2Y8adWehn/kHEbH/UVX2eoJWfZzC07uQiwS9T+29I96QB\nRE8cPQHg8m/CSUba44VJKEe2ZU79DF1QctkbW60yW0G2zhWVAYQOkgFUHqQU\n0NPW8vylMYicqBI7K/q+pFgSm0u9oM44N/qIYB3Ib7EZSj2tZ8GINTbzZNkh\nHDfqMDX6l1BGbQIHiWTu5F04vCR+DmSnCogxEFO4iPmmo+JiOD0gsZoJuvON\nrZqm780mhqYznSLgh+NAjuujaLaBPHS9MeQiPRt6YH5mtIPSoER9r6qqA4uO\n2L1c8cWY338B31Kc8MnbmRtVwvseGmXjpNE5r02cu30XBB9tuKosLC1RC/Nw\nROylkl1EGDgcDIclWFSAYLuUENkydcO947SmShqjkEGSycYTud6GLKdVemvp\nrzHDpQY7kT3SOCCT6uvObO9kbyFIWxLIaVqfLv3tZm3qScYuEgRiz+h50SAF\nRjA0IMTOzB/3reDAhet74jJKhuxVx/GOG98TQuvBDoJpzjRwMx1Y8pzqKQ26\n/8GF\r\n=pIML\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICmSncAj+pvpZbw0bgw8U5CUAcaeJ/GfKCyZe/QaVHD1AiEAyBp8yQKPwSdll09/owNWEDOgabvUPYpaCPBFHIszHWw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019143419_1539952533303_0.6969963856112007"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019151152":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019151152","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"851457a76e7b20f8b42536eb4a59326f0b3e911e","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019151152","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-mXZjs1kqUv8GPiVVzPSqAE6tXm+WYA/OIUYjFhT9Zfyu8GcnP3DAbgqBINuQQdft7J8u89yUzJhlBwEcIGS3Vg==","shasum":"eee75ad5353ca1c15ca254621a775042ba1cb19a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019151152.tgz","fileCount":357,"unpackedSize":1298079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbydhiCRA9TVsSAnZWagAAedIP/2KV8CTroXHCTpOqGmFc\nBvdkKccMMbZw7Z/VJ/9bUjIzLmI2LP5MaZ6+SeaPGGGZAGXM0psmXFuw6oBB\nrHddgZPC1drqhO07yTPVww3BgAbF6UXVZ+nMR2oqkCMuBvEMrXzlFq4jSswp\nViVdnIU1SkPDLzoYGbHHsXJulE2A/GOSjuPGmpKy1nQJjMq0BxdA0j854KYR\nkkur8Tr+ooZQV9+Gh+Cd33f2LzImduo0K+zrplDdg9hMni7t1jSQcs4G2wm+\nih3BBONr0LbC7MIzG9k9T4DGIGt+I7yDVnt51b24L6arLelvsVmuZghYN1yg\nDaqdUNsLrRIjXqX/Urug9/TfNS3V5qD3tgmpTbSQfEUpfhUwEyQ4JNBhjl2q\nKkplRcZB4ror5EImmoYGp9HoI2+foqcxon8akZDzkHCIVqlxst9WVSfJbUog\nVzDAaFs4jitlpfW5iGCsV1T1we6HYdKmaWO7/FzgV9g71Sfhq9/Uq5v0hpL/\nVL+IsxNBdjt7SK2VtMnalG1YVtBK0fL79w8WbiIRG/R9W4IvE+MhN8ruoRzq\nBQj4fJ9brbOQfoQYmBkNQ3kABVgolr1dijKeQcB9cV3+ljl0PKIR6jQqN2At\nGefVqmChn8k56u5oljN2+nQwWlmelhTiuU5e5xEu8uNijyePxI/Beo04atuX\nFYuw\r\n=WweN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGjwAB5qKdjXj/3+02ArQ0eVHu6Ld1XumpY6QMD7utZQIgT3exoBQuYUnGzWvkrw/JVpu1hhO6hrllYz9TXeUzEkc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019151152_1539954785327_0.523421785702382"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019151453":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019151453","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"a693a3bf5893684f1f5ffa85710c8ba208d273c3","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019151453","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-QFYVBKI+Bt1ZnqXQwkSc/W4oNgrWwPk8yAkmkSzVM46glCdN/b2Au6KPwgE+ijDBWY7sxGxJ7pA1/LCew6negg==","shasum":"715a39886a33a9b8441321dc671cd57549c9cf06","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019151453.tgz","fileCount":357,"unpackedSize":1301295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbydkOCRA9TVsSAnZWagAAs1UP/1Or4jwFbCBpDVTpitZg\nRkhozwuHH+LBycMshW0seFMujx0oAm6zSmhZ6WAorREOgxEL8L0bc7lHFuFI\nvklm9k3WflAAb881LdtrT4u0F9jYneqFNyUE2p2WXZPelOroVtVEAgvFau59\nc7KxMQErP9m1vojPup6WlvhJtrLjPTDNFoGkfQWJTeyFecg+NPLYLwIvH2WR\nlcF4uLIRAyWHpZJ1fscP6YiztMokgki5hE/nNmkWTFgjpY4g7q6YfXby1pDp\nVUwAJtHyXs524YBGhLuKzNBCl6hkUhnO4sKbaqm1GQSKgO2cYGttD5fIe2g/\nphIHRsuJvr8cxTda8kpyP1ItLNAfIqQ63mutAoXkaN3O7riEuaFFiBzR4VbN\naPoeewAYSVecQaOtRe8TcAsU8kdVSLzB9HkrHJNj9AWYYKXPHYKjZaAGoVol\njrIP2vI7m2M7bF06STCJqJGRNMFSo3LNAu+WSI+7mUpFuJMYw5wlg8TQoZcz\n6t1L0KLYj5WlJ236fCHskMz3V+112x6QO38JRjPd1DrhSMg8mF3DNpUjv8Z0\ncJxRMoydVl0FfGDAh6YbXhlfcdb/iqWnnP+zwa+1aWPenYz3KXy/k5+yICsb\nN3j/wjK5qMdEGA3JPfRFXApksNv2U6ifa3xacmWdb9D91AXX99brdFouU0ub\nEMBd\r\n=HQsf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDL8eobjsWSEjHhmtc+Lvjxg8vS1WL2z010YJfWnXwcFAIgZsTuvYwce+f62EDWn/nfCWd0DDWd7xDhiywwt5dCABs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019151453_1539954957612_0.850331454770942"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019131651":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019131651","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"a693a3bf5893684f1f5ffa85710c8ba208d273c3","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019131651","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-3oluqo56vtpCfpOlSZui6swJIWPwiV8fL96mPgsbywCN5kDeQEft0PJfvmQ67Duwmp5IbTIFx3KD6zB4XvmKZQ==","shasum":"43914776514e97f47383d00eaa510126697ae018","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019131651.tgz","fileCount":357,"unpackedSize":1300932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbydnMCRA9TVsSAnZWagAA4WgP/2c0vllP1SEALtk4uIKR\nJRY2+WWikHbd4yvRUxgpfBTSql58EcAzYn7R/8duc7arT5uMNgRNbQI+JTY7\nrQPiZhc8M7oX0rlQ039NdePMSTF3Dwr6yEpyxmtwOffqAhH/utMzR5TpAMGn\nhm85sb8BfY1lfOrHW7C3jAfJIG+swWAg2EdhlJ2l2IQFfOtL1FATCQ5Mkp8T\n65tTLIqnFRG4MwmuGmmn2tOm0J0bBVbspn+6t0X51DmtMobY9WA65MGgpFnp\nwq97CAw1YuE+KnezFA3w+b0Kr+xcYnOlU0cabe6E/VHt8pinBmRABXvH17n4\nRjs8rc5zjbJT11LhzOs8+kNHah6uA4DzZGb4c+OoK+wKnsI2IiqoV7zxj07D\nGSvQFLnDE8H3OlF9HUTar//UfRq5Bu5psTOXSMEG4ZZ7C92uZ0rIDBJiZq5e\nxVJ/jdiHPpxDXefCSviRw5iZdVjQAcux2sWkhj1KuNWJmeDolZhnnJVV6fv7\n24LQldjCLmkCXdl0E9zrnMiQ6uWnDzkblTuCZ2zgjswDoWqj6VIlHX9diq83\ncE3KCxqlgMBWsai1XN6Bfbgf2ipgCVXPTXgp9A7EZvWdQeiLl8P+ByYN4ywp\nRqwqO7XDARuIhWsjUwdsD4aXN4xqE2PwH+EO/bZbXTcLS2BJP3cZe/4DJoby\nghXN\r\n=QZVl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDn1TET+ca3x9/BKAi9pBq4gmxh8d5vJtL/AWADhjdF3AIhAI+pczXVhr4G3zbOLiMzi23d4Jxj/bOd22zOSIIeZ3e3"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019131651_1539955148025_0.5282598016148341"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019151802":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019151802","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"a693a3bf5893684f1f5ffa85710c8ba208d273c3","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019151802","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-5o+25fwEQUGTxUEAPCC4JtxBZL8thnLDCpxWVHmaHUko/EX8V6iQpPMsuEI6GUYMfJn7ezABGxw2Dh0uiW8xMg==","shasum":"31845a8c5aebcd2bb395529bf2d0b0e31a1d8335","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019151802.tgz","fileCount":357,"unpackedSize":1301295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbydnbCRA9TVsSAnZWagAAwsQP/3fapGkONAh/vXKnzC7v\nF6YvCHA2/2aeTBMBete6677dBU78mhtsUsQCYC4MjE7fCxkuR23vTs91xgm1\nn3DUsCm+/mn9AuipN1o0KfxsqgwAKn91fu2UdGFo6+f5qPjGcd1NG5tm3I4E\nZaFYSe39lrlqGBH4pgn+cWC9p/URAMDSVen+/S/UQ6Ipx5SJbA2qvzW7oIXM\n9EE8qRH284MYoU2rCyhEzoJCqla/t4x/snwtooweDIpOfZXimKI3AT06Ye4s\nvSZhe0WJTLTxFkz3AFjPt4vvjjRyTerDgvBQTaqWVq64lui+67czAzZCDVni\nePbZEYXQ8hYicocbvhRoMxBHjmDGllYrY6Z86MhC2aM3ZQcT75ZlTeHqVhyi\nnK6y6/hDBwAP/FRpCXKRhzrxKguYYlxMk5cLtV4glkplNKAG8RXWd3aqRgPC\nFawyTQUX7/Uq7bauqL713kfx4HNXZ0zrQu9GcB3jhfmQt5jgASyNcv5Ni3sL\nIfvv3ney4kxWTkMVXNQlIPhoIAs+SsXmOb5Qc/hPSMvolEgKb6/1LOWdqocR\nvlQeXz5ABf3GzVa99yDqjvOx3ZtGChsiCZVeCREeFRY4VIaIpoSf2IS0QUB+\n7DdvI5xLT/wo91OjvBA7q3rXItmFAI5qo0ZEYj/gkduObklJd4kkAUst5Yg9\nBcXh\r\n=iA7w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/mTG6ZoH//eEZiITv7Oekt3tD+y4zB4re7nWMRRy21AiEApFbdezK0NZ2+Se4hS4IXSnIPB1krNUYWxrTwPEbI/Vg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019151802_1539955162825_0.8859363317122955"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019142641":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019142641","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"db77b9b32d41bf37b73fa608fe7c4779e6f28485","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019142641","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-piD1GkoaDnfxfo9qgBCNqZs+IU70kXu59X0zequSdDgfCSLH6TMDwxlmg/uxsCuj1T3SjOFLcJ3hUDXYjXNxXg==","shasum":"abaa15f11af6be6badb768b99974c28f9e2d0444","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019142641.tgz","fileCount":357,"unpackedSize":1300530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyepJCRA9TVsSAnZWagAAVosP/iXf9zV/y5gwYbQzadqD\ndO/UkNiTgvEaekyGKmlMbFxzLV4VDv1JntWHW5vWux1ntGIOCmdp9lwyx/UT\nhR3qOxbetnXibibELw38DXhIlO1FRaE7+hCQ0HgLofkyTA7TCtVJ0+0zy4a6\nj7Kxf/03/EVuZm0QJd0jt4K42qdnOxUi6ppnaelbMcEcUt1JvvCpaaB0Fubr\nASvszCKbv58+HIhbazzT5KGKVmjBXO0PTALYU2Zq4VFF/zlraeBrkMgF8at+\nezg1+M78qOvzZy4uteTIHD8eN3wgt/NVm84l4K7O5YHt0A8cbSsJ7AahdJUG\n/NeC41LbYf554H+Mm/Eity5PtaTv8ak2MApcJasQz/3BVChjAFdhPy5EiWU/\nCcdJd9UNvzZXS6B2T/r7W4v4+Nfl4nhz/AKeuyCpqOMT8mu77v1OT+qgWAtf\n0SbrLujg2It8QNXAatu8eh86sC073BM2MqEnJR7GcLGfiatuDF6m0HF9Ufh+\nMveMAnur/g2XRhn7wAXC++4r5GtWlRVHqFHWVihhrf4I1moy3Oyw5ERZcSOA\nnRSxvzrF2cc7JGL+BYkL51q7x7Y+lIik/9mddE2UA75oAldnb4QVwCqeb4MB\n/Fr+u53YrmwVcr2aqKFr9zwcpf4ehzNZgBaUhXi2bz4O8QRbe4eHvHsToh24\nFPQS\r\n=3Nsj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEdXhp6gOyKa521j29C+5yz/j6WR8p1pLDUgz+uDK/+AIhAJGnsz+KTfksEOYbvv6WPENAS0KaB6ap92Wb0ZDEgd/w"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019142641_1539959368566_0.519569876609544"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019155042":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019155042","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"6b8165df7279854a4498ab25a521439667c6bbc9","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019155042","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-sGLQaed+X4mdrRPJKK0WNIIMDIjQ0RBhg+NZE+ioaYfH8+yBsq3MOZ/W1+8WYd2RFH4LeN3J/cjnPQJtFQlbPg==","shasum":"550edb097b2960e20dbc093495f022dd07a1ca89","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019155042.tgz","fileCount":357,"unpackedSize":1300738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyf3GCRA9TVsSAnZWagAAtlIP/iUW9ghy4CVUHiZ01isN\n8ptN9TKOsy2vhHEGPwG5gZf5c/35qV78DgRCIIip/Suc2fJBRzYvjwoMLX/h\nwQleYEPvUZAa5BqfuJn7BXDjdBOTnhvZSv2/r2P3mOzMC3Lm8B30JzIzkArr\n7r8NUacx+ygc+HL8tv8VjognDwtx63dAxwCNjgg3t3LWG5nJJgPETNnZfY9P\ndZacGWW5O74fpVdNeRkRwSy6eiu1chHFlG5c6xKBDeyCN62MPEAjOCInMgVe\nONtDBAdBnxVLAsypsO3Pw5kK06c4etUKCw+2MsErG1ODnzjqlD97Thwh9LsW\nn/yCxW/LoO5i1qh12Rjj8GQ1znjrrbukJMzfn2ACrKY38ZmKhHJMlQnwwJvS\nm0A1DKGsIIFf2Jdmc7BSfctXkOdc3DrCtfWZi1pQdxhoDuN4PB9Wjqlg+drc\nNWplYDY+ahGOocwoLU//dzKirBSIgDodXObUBGvgJXbPXMi6hgvq9gNlBGlB\n+2qYfsHOxnAvb0uh+ehhKq2SEse/11SFnp/WUrixXL+gcjznZPw739cCcqar\nOdUU4OOwzXf3pMhP0Ze/EmQ1MUCgb3nJDxHxX87xFRa0IvieBxnovZ15twCs\nlQuUR1u51dCO1GpVESgW3R2nnJlJ+Eik42kVGvLZXiHzmFwiIDRn/+79+GTW\n07za\r\n=2Vpl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFAhH5yLRMNlpDGp0b9Cq+x7/OUP2qSRz5Ucgy0NKLSYAiAFUbihpZuZMF3srfELyMKtF1QQK/uZIWh7OsTmHFiYFg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019155042_1539964357998_0.5331435881767477"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019162334":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019162334","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"80d8f4070d390a5cb2eafb5f10b0ab49b27f566b","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019162334","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jgXgX3NIFjZZsKHw2ANX+GW2T58wFyEjvXdWDkxC25z3kHiWe4we/zFP2A0ZBSTWZt6vAlsfDuTMOHoMq8TRGQ==","shasum":"ef87bc665d79501a0183c4c124b16dae973d76ea","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019162334.tgz","fileCount":357,"unpackedSize":1300894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbygV6CRA9TVsSAnZWagAAY8oQAI5MNKEAnRkhc9fHEzXG\nTVda97dL1Dxlpcm5LKt00Nxv6NlXMbg7oL2AfjpKYHD+eZouYqHMiUkOPFHL\nZ3vep8iRVbL5IMvC65P2+sXMHl9OzbDxskIxZQBPY+QJG5hAN3xJo9BcS4WP\nwnHxwCb6eqOA2v3i0LfHeVP8CN31RZdlsWDFHQXdSGBIVYUUrOf3ZAcPntk+\nwUWMXN5Ai5WjnHXpY58Ec9zms1DEGRD2Yu69ilno8pgEdcCIu80MfoCpSerp\nkkBqv1QFGuQ8QHoqixjjq65IA6ylgWfVpr8yuiivij1xJ6hBp2w2QTJVK9io\nnpX6CUXDy44IthGKFDBmByNJS913Z/E9O7/wEK1CkXoJ6C+J5X90pSLnUGZn\nb47uoG7le/qlXPdBWmcGcrEkMPP2LkPQdv7x4UKCp1cFyYTuYzAij4Wwsmu8\nk0pfuBrfmIpKVIzLuU+DNpz95XfZw2W+5Fi2ewsOK3WkHNar9coN3TIPH4Tr\nNzUsPAaICtLXoYkSBAynEFA3u0JmNzzkw8osTeSMMUadqWtYhVqeTKPi2lV9\n5+saG+Ly3HPUQhd+Fb+1zKWGcy+vELBxvE7DrNE/xgWrREUGTGWtu1ih1uHz\n8LRZl/loyuwmQa6sLVvjjipjLRYNxPG2SW63uX8p1u1Af4/4w/mR0WwvTLnH\nM1hR\r\n=r0ka\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOGqkUwpOmhG15KbyF66hXp9HsHrzdV+4WTkSPu1IIngIhAI3dFJXvL8jcvgfJnxKQlrHp4V4A2QEb6g2DBCWl5Yc4"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019162334_1539966329786_0.34370813056392446"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019164749":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019164749","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"7cc5f78078d5ee213f006ad259c2e476d97bd0ac","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019164749","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0hNjr+Yl2E/9geyomrh44KQP+IqIwvf2IEDzjSApFl0jk72db18d1+bUW5mefCIpo1yWv2tzbTRtt2rMiruFZA==","shasum":"8e2fa48ded9c86410216d4e3025937a2b5a451d0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019164749.tgz","fileCount":357,"unpackedSize":1300968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbygsqCRA9TVsSAnZWagAA878P/jKNTSflg5UWKm8d6uAz\nqSyxjnm5rxY+YRxlpH0NfAV+Ji34iBjLpQXowAcn9lZOLd/qu9ZYGAkfoe2u\ntnb/X/8gtGgMD9XOzAErvtZy07K+EOEwKYX+51bXwUVDdp9sCYkPpm+I2KCU\nCA1xre5J2M7HGy50nJ0vFnDwv9+Z5d6PnAyVkOqJspak1rLS18+p19F/aOap\nyz1fsBT+Se9HtSHL24pPO/LYekeKNir9T821qsh2C2IAZ/H7vEOCUCPfh7dv\nK6PLDh0S7PG9Pn7U4FnyB6PdV+uVA3rkXzCWmEQTuFha0Tg+Wjh9/y1IgK2o\n+jwb0SGE4A7xysM/QzHbn3yDMwt+mxOkIx2YW0JzbQbsiLjcKQywii/F7C+w\nijOf0rrHPAHWU+yL3/A6dIPAlIdLOO5k0mtHM7/g/dCHrBnfS/3fDHFxDSzu\nf69FV4uoZDQjZwDI5duQn1hZeehYNs+gTPg2JU3UGeAmB9Oc1czGV+hvCEJh\nCHvoyCWdvNPrGQWpADyFrJdjAczpO3c6LowYwDO3vGQwP3rnJ8tugenAd6X3\nHFR18N/rWkVfvr/+ot77H2KeVW4aSLJEQtf2W5+OvMU7J7gKfCa26ZxAkzPV\n8VZhhifmKJ1BkI0kNawJOiXsQHXb9jlE+n/EkIoCqH+vR5bQnQ6dt2mH4QEP\nQdFK\r\n=nB/n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjkhH7PBVniihH+sy57vyNYxOU4GAVRYhMwFe0ONN2QQIhAJlVnAkdTZRsMlPKxrj+bfUXNrBaHO7bdeK5shFhrDuh"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019164749_1539967786004_0.956544376756695"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019223839":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019223839","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"21ffef13a8d676aab5560ec2cdb693eeb5e1be93","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019223839","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-k7LE4oEYmA8dJ47Gi3jouMw87OhoTHcCelye+/vMazf6Y1MQOB8uOlSTbgiwtFaU4e8oKlsQzvK3KGcR/GrkMw==","shasum":"78cc84c1f80bf29f4648745604ec3b9eed2111e8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019223839.tgz","fileCount":357,"unpackedSize":1301990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyl1dCRA9TVsSAnZWagAAQwoP/iFe+wHgFJMWK/hTkc3m\n4MuN8INArW5WZQS88RamS+ER38IwYLblZCHn7wGstfivFWrwW0o3c5LJ5KpF\ns+J/+KeiNwPs101KgGQVloTLq4fWqO6MFxb9dTmCVSIfNWJ+MAPlSr9nfVvp\nYllGa/VEamEsIgz5hrOa8FLpeqxipC73qfZeqWmFfdQDTSNGblt9Lz/imapF\nQUYuKDuV5VMt63crNLV3lUfTj/paPs2Z6nzKcBUAD7VxUaJYLKp2dpCYfAx0\nplHzoACVs+WkpitNCg7QTUfIoL4x0zqyLEBUz+n+QeQUvOyc7/bs0GeVRrH2\neolDcLa2HBZVBklxVNJvAipeB4Kjno4TlBPvj36pDMmSjVgZT5SNjH4zCdzw\nP6BSOXUwvRC7Jsr+JT2KRQdubccgpqqVq8ts7WVpcUq+dsG7VCwMpds7fuZx\nSZ3ASxmcaLS3PydK8tShyak58jqXquHebj2ure4GQfPpyhDZOHzu0z26kpia\n2ogV/FiwIfMi8eEc2FHm2y0u9HW5fsJWBoP4CatL9/kzbzZWNQhUadlAH7Ac\nIeuAl61eZrXWHpPUw6U1VRd4SQIKVIz5qmOSnQiJUeitxWugXnBfQGAZa193\nNGcHaKrTI8bbdU/b1KLB7VLrs3SP4ROHAgr6MeYB6uthgXJVrcLAJ/7DzwO5\nBdAB\r\n=g7VV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD80hYg9tzUUj4Fp82ATd/hiaSa+4QZXVu7irhCU6DmqAIgXpWd+c6W3BbrXhpUHOZWJMLDXYc6gIK8/wOkQhKK8kk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019223839_1539988829193_0.26022059788127794"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019225045":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019225045","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"ce6f533e28a5b7147f293b75134ac3466e7d934f","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019225045","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-nMJ3X9B9t8k1/iV1/KhWEM1uNJPoFWMUXVF7wYmGm+EQy07lMi8ly9iPpNL7U+GV0ckUUL4h4+lIt2fVaqPhhg==","shasum":"6931d7d1d979e22b7ccc012fad37b37bf62bb63d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019225045.tgz","fileCount":357,"unpackedSize":1302174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbymAzCRA9TVsSAnZWagAAIV4QAKBkrwTI9Xoq79CN17AP\ndhJyNfJVZObcd/4krAUabA4386IOp/90Mjksple1vcPyHXx8uUTV8NtJBZC9\nfSGPKuM98JOVuoQ0oplBFUze9NWwFBi+SVIJ8AcdgV6+EFFGJY7DO9MLJeTm\nAUpdjGfhH4sRte9+yptLE2ijiw4ftUevjjwIIIDSJmqCrbFHmciwQggcp2FV\ngCTMA2QjC2VjPw+RozsqqVwuEl5eGPayYrRD3IP6Ey8Pkc+dTK65WYc3nhic\nks3kmc/ePPHJgA+9Lancvx9yAnnsBsMaGgcRQxFU+CI6y5jQjxde4dhHw+mf\nPau+qjrEdrlnjDz8iT++GeCiMtI+oI+epntraTsPHsdKxkxQ3wuCFNxKGsSE\nzYJfeGpcz0bcEUADF3tymFaQMMgLb/AjB/b3WOICrUPKMQVV3z/B1feRZUpJ\ncoczy+TOx18+p/siQ4DeiuHU3PG5B2QZcePloLx3M+f5OjT2FDxo4y1PGj8D\n1DDoDocbTsyaJq/8DQAAJxxFZIuc9WylMQKPsDVXRDr2xNI7dVDgVBtOX9n9\nUec+FMgD//F4BG+JksNHWbCooAohk96MK4wP5UTA9zZasgGpa+SVLDf7YOY9\nGGePSvqsd9inlnyKKBLeOWOrMEHNsESqRc0c3qLSTIB5xW1vRt1kWqGV1NVK\nPx8J\r\n=tCrB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgHRXFvEBaynPf6eEiHJfWy9WeDZVmI3TCffgHvIqIBAiEAsmObT/Y+ANc5ARVrqhbcUpc6Ne9iSrIJBthM8Dr5TvY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019225045_1539989554999_0.4118960391959616"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019230714":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019230714","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"05d0a186115212152ec3ee7177ee5063be18b98d","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019230714","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-I/jOpC5xLTHEdVuJXWsdfaJ2D85Ld7SWXSeqrPBG+b9AsCfvZOJn9ebDelH0a/pUt415L1Dsh3/ydBsq9IcvCQ==","shasum":"bb453a198ad11b7cdfdb1a9dc21daf78056f3069","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019230714.tgz","fileCount":357,"unpackedSize":1303694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbymQmCRA9TVsSAnZWagAAAocP/RPWFAz7GknL3ppY1bo/\nnyPjOpnk3M7Nh7/5Smlqm9Rr4Sg/IC3cXcQ7JxxbwnJ3B31GqOR80DPkwBOj\nbXTlJc60xagp8ZufFqC8idGu4VdpEWFYbvy+FZtKIwdB1XtLp1T388Hk7t+o\nwaMAhqjf8Oz39GA5Rx4kF76td+mb0zkeXbEZ7MAgBQ1R8rL+r7AqXETMn2tw\nug2qAkHsj+kEtJGvP21PWPNKxN3BYd7gx9IJPJJGVsYlbKRtUcflllbNWez1\n9R/LdrA9+33/tu3DaN/nqH6SAQDLrm40V5+yrOMPxBV3iZmYvrOWmka+7/Il\netHZXUS9dQdomJWeaDeImh2rTTTuIlOkTrJd8L4gTtM0C0wrb4BdnuUdAOwJ\n2BwXUq6ey4rNef2sgQrg47NKw81+4D3Su9o1ty4TzCgZgRfSqxIejJ0u2hWn\nC8/+csoh5kJnGwpDQMlIz9LSFmOsUfWfb2Jee5zYwbJatt3dwd/CZe7GAWm9\nZSAwRwryjRGGTx/uPvahS7y/RSCrbeT1NKlwMkl/Zce/Kcf+6SWv7xCfjETK\nROdIcKHjed6pL+wEbhq6mstb6z3rnrW1TbqWCL4jElAD2DDfQqme1mMIKW2K\nEGjrpc4KrAwMCgMXt+RcSWB0g34PP9bYTvQUKYDRQm1Wv2YOyKG9Fvs8bpbS\nBF33\r\n=fsR2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAmLSqgTV0zejzRgud7aqoBCoj/5pqvfpbHFriuC4zdQIgOwkzz55Jq9DTlRusTgfFz31omz6o/YZWNEqWYpEUy28="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019230714_1539990565788_0.703365970199666"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181019232817":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181019232817","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"70d5af14f0f152ad71ced097dbfed32fd249dec3","_id":"@atomist/sdm-local@1.0.0-github-actions.20181019232817","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-fJupXg/hquhpQ4EslNn02+tcT20yqR24wz0mZtlJHGRa093wuVFgRVIdLpqW9jJLS1tgAImxqWyhsEDf1tvzKg==","shasum":"0b742ceabf7067094cf23a357129d4f8df8364ed","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181019232817.tgz","fileCount":357,"unpackedSize":1303796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbymkCCRA9TVsSAnZWagAAZ9YP+we+FhI9tmmMkNJEt4qx\nZ+cKwKvfqgk72Gn4fUUuq2MjpW6xJ2Mk6QlDNdAdcaXydR7fjVo/N9ibk7n6\nsm5P1PK7pn9yTGVXIFukCXYg1hSy6HwwSU8ZTeSmXq9VTsjP921ym/yL7mNZ\nwk3PuZaX7ea4hP8scXuJz+DmtNhTZVZib9iGbMBsyJfmw/S99zlOimmCeivU\nzAN2y1gjCxV41Flax+hhdqmP7dNEDdj8WL18OfhH1l9hpasLCxNEJ7Hfrzmr\nt4w4+tQKW7Blmqqb3s0U+8FnNXqP4gyycZ6O7egZRu8AFGZJxypjQSoWjv0A\ndyhNLz6TXgADw8dHHmPjIMe+/qVbM5VT6/TCrKlCORU3YsVKVlOzKoYEzTHl\n0LUl+2CZOAO36AAZxVrpXp8oeRWOQv3Vs5/O8oLsu0ZfTR3UYcsWS+k30Pjr\ncrii8mv2+2M9SbFgNLvZ7oqQX15zLhFIoObQwqe2pE+nKIHcbqqdKDd1Tl1G\nTiwNjsoQKNu+f0C+B9WXqLSuVUVKpojus5gwm5lnBZ1ektz1Q/ZyiDiDvCKN\nJIzJiTl0tzazCeGmKJ5hgSqgqDouifwV4ApZHRPhBJOVFTSqEH71YdGTsrMf\n5hnrdSZpU/IbMgBYpXmg9F/DAknMhkSUfrYKtUDxADuu7XLXS09zw2rGQH9s\nWZEA\r\n=EPQi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGI9vOBmfJys+pS88UtIYCQK4/9ia7v83c5lKuA4jscMAiAmTovgIVJVpRNh+fxrm9dnckT9HveweHjwvhxlJIiQTg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181019232817_1539991809426_0.13912556241665275"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181020000526":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181020000526","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"8ae2fa60dba1acef1a1ca6d3745afab7b46a6af4","_id":"@atomist/sdm-local@1.0.0-github-actions.20181020000526","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-kMVil0FzCbu2O4BX6NnZk4mMzERMJXiJfXySOxVCZAGwBbau1pZKKqs7+NfbE1XW2hF4rQ0rvJRibZBnlTEGfg==","shasum":"4a584f463415aa539818f0563f21dd31d825b28d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181020000526.tgz","fileCount":360,"unpackedSize":1307536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbynG1CRA9TVsSAnZWagAA18oP/RSwIh9FSZaOpwbccIlc\nfuODRTPkHVc4FOvG6lDMrdeZmAuhRWx963QS3yvKgTH32RH9jL3AK4DAyHUf\nedlRMRqWervL9PXIBg77teC/F5MXiLMvZBlallh1ZYVPmLYWQhN51YcvSenY\n8YRmNHVxKuTIvvyvfrUy0dJQZ2IAcGnFOhhHT4QU3lcIAg1JwOwgmCckLCpS\nOMRmX2KOik7fvOwUd3EcpGXvqhHpBEhNMSxe3cO3xJLMoz5r6zmNMJAusUsP\ntjwBMuxU14T4yBUC5prn5xTW8gzeADxiXGgEqE+D/8mnEuVhd8FTS+yteI3I\ncZ6H7/5bPTA3ICAH7SQ9kwTR9o4ZnTJJH6lH28WYA55Zy64ezlsq/syNFwl3\ntm2EF4JxaVGGv/waTfSO3Rp6QvbwiyEBhLqAK1go5dhdl3nNzfTCazI6yJii\nMTLiKW3Y5cqTP1I10nZpZ37UuJBoFZdZtA3jAKI0N7CgTlN615A6i4lTfeYC\nnbIHTIn4s//6FJOojXifLZaiXz3pgse1Lv4rShJxPih7H1RGfUiH+CxqBCPA\nmEdc6+i1GBC7zcHZlVIxWffwPSxU98PENLyH4Am/LtPRN0iaTVblfSw47c2H\nHHVXBgwGF33RM8j57NLdpJMZHQYetZ03h1kQH0Elo2KNhGBnnHhA9vV7VPhy\n33jt\r\n=HtzZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICfGox031rjVDJNmx7GkvAAY+/mUK1JVSJU2kOtHwctBAiEAnil2lUW8x5I02/Slz4VdFbixcMe8wQBc7Qiq+1/ybFY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181020000526_1539994037025_0.7640640372082317"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181020001652":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181020001652","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-master.20181019075335","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"a23e358898a5473c15481fba5fde044ac19611e8","_id":"@atomist/sdm-local@1.0.0-github-actions.20181020001652","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-p6gijy5z/woP9Bhv9r+8dsPHIcH8gpcLx9aawf9iIJYDuQo1kw8VixO5gl2u/rGiRCXRFSc6L7BNjboeLZe7qw==","shasum":"e88da18ed09068604cfd7af33e24af4a08d2bd0e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181020001652.tgz","fileCount":360,"unpackedSize":1307642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbynR6CRA9TVsSAnZWagAAu2MP/2Q4ATctCvULYCUftEqM\nKJNJfk+R7EzvZYXe1SgAc/k5G31Mas+lS3z0qZOwRlLouO98tsrqfDyIQS3s\nj7Nm+uWhVJv+Av2gi8MjRNVyWR4Q9sSXnqlWj9MVF0BoE6oembbGjqibO6ZU\nTiP3E+wx0wiSouKeEOiPbBYCBamHicE2xiAqiDHQAQxMG33B+JudmuFkJyKy\nqWyExjmkyoE73z3UZ8o76Cmp4VZFjeoPv4ARARJNKfdFZG2CUAOSdoKYkEko\nWbHBiGRqitPfNwL7qK6kpbKjRGeAI6U9qCHtRHfhXG+7aPb3GqoLMhRhyQaU\nDdS36wRiQVaFwW2jrXy1xG8kOc6tM981tqIKiIsCPyCVsEPjshx1XxGYGfhi\nYLh35lBgdox/HHlUGMNR4y9KWXcRNoT63b+bSSGwE1/pvwGNBGQ0IBsKWeMS\np1ez95VLRpfNi/T4Od+98fdP11tljkQDrEF/BYCBLOHM0kZqQwTK0GwwAVXr\nZox5Fj42PDVAUbSXxQ5zjRp1zal8YPjL19fLf5qALlBBeQzZVivdShjn4zR4\nHJv9Tg+xEHCMpBX00NUIB7kutpBQHkJoxnVIN1zOQUQwMvP1HNIFvNpiL4x/\n0R5pCQ7NiAhlL7c3dmTAtTGs2FfjJxjuHkiiRoRVOyW6TIKesCtdFpTwWJD1\ns5BF\r\n=UvBH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDA/dEui06sYazomYTWqnLnrISKeqUTp0WjwtsEhWwt6QIhAIN0amXhciKYtxZbUKXPCTtpw4kQxSGcLJMAyx3V8fvu"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181020001652_1539994745180_0.48556739237377333"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181025205820":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181025205820","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-github-actions.20181025204359","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"9d02086f7e2e44da9a535b8b9ec31c0ea3d62fce","_id":"@atomist/sdm-local@1.0.0-github-actions.20181025205820","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-hPX2jtr06YaanIdjNLGayjjP8jhEm2AuQf19FyK0lHJ9TG8tA+UYBtcdo492CXKrA/ZpLq0gkivZGxKkJE95bw==","shasum":"bd1f3761aaf140dd83ef821f11b4445e4f108314","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181025205820.tgz","fileCount":360,"unpackedSize":1307986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0i7eCRA9TVsSAnZWagAAHwoP/ivT0pd85mvEyqtngI6m\n1K7p9XTEbbbP+1EG+irRKUTzf5K7a2Y9pN3OgTrXJgosug63clZb0a1gxI7o\nbU+kfyTGJfAvXZTNiR2EeVPQLXEpQ05pFiJwbjjoDdoB4jsYC4G74rlXkoW0\nz0o6dKWcVbLLImxlm+5sAU7KaRRLI5lOUO79oyWotZ7S7qI4Qr6UxO0bfWtX\nr1otfjtIczRewV1HEqVizfWj2l2QIcV9kFhkmTJpSLVVT6PtG/OhfTVTI8ZX\nLvwMM2qysSfEe+P7fKpTHanJ6fBSRtSehSwcn6YZrhO/QhhXP4SwvTTOF9Qf\nz6YXFUVOr0qE9QI6kXN81HbFiBUd8a3LDNMW087nFzC4iNEfo9Rwo8l21Jwn\nf62I8Cq7wdP7CLwHJRWilWD0SVuTj6AJdOseOrda4Mo+mIZMyXg6KCQXumb5\n3l/Y2FXGritCpJq4gdYAu4RcNlVp3TeRK/sqX1B00fE5S75bLot0peCXPlDV\ndvu1x3U7VLOY+V1AIDz9GnUORPdsEj0l+9K+pibYB7DfiU2PR5I3DxtEmRqE\n7mocJSYLDVG0kmX0NA81M4F22srT2KKJ0BF3Q/MxQ7Sd3T3h6m8Lnsn6r9gR\nwCOdceMTXvw4+BZN26ioFgNViEjmekN0X95s9BdQP9fHpwtFSRkqHXFws6rP\ns/9k\r\n=4IVV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFMr3Ir8cNKcvelAvS7zFZqugS6iUiz3MRZkaXFtatODAiBgdIJv5qEsSAZFWdnUG6hNnUsVlugXSoKHbWyZ26XHkg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181025205820_1540501213780_0.8319037300403052"},"_hasShrinkwrap":false},"1.0.0-master.20181026092118":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181026092118","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.1","@atomist/sdm":"1.0.0-RC.1","@atomist/sdm-core":"1.0.0-RC.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"5787be30d648f4b1ff189796898f3f9c468d596d","_id":"@atomist/sdm-local@1.0.0-master.20181026092118","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-sT4WHXnL0Iq1wNuhtwSnnrrHjxeCk9ql4OgbPhz9JUg0b+HF2mZVjjQuFxFBj7Z5WaJbLtHN0kYz+tFjh+pcUQ==","shasum":"2d14d974c98dd0e4f6205e3a8e9366569e46f4ef","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181026092118.tgz","fileCount":354,"unpackedSize":1288950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0tz9CRA9TVsSAnZWagAADJEQAKP/8GcYSZcnthLzmhNF\nR3oN7h79OZtfhfydQcEEcit3cn4MJsK250cGjykzJUNfJ9wPhdiijjbfY4OO\nVkcBnW02EUEr0PbCWs8UjqwTW1zR7UjMqIm6KxUQ9A9LLV8iq1RUEiUhJrIX\nM0bubhG40btZ5WF/XUP8L8qIG6mWBEc5M44h2FMh67EdtTgNNMQtWODLaqyE\nx+mB88o7GNy7ODAr1uYaxEiUxh+1CsWLq9qUPsmfjfE/KEW5E6JKDcG54fWJ\nvLGd0gIT3VEkZ/My0NLJkJHjyT3+5XRhRNxwD8TlGNXj9200LEr+Og6Ocdd6\nVhdEK0EyfpYQdJEr6MlLewAGEF2bFG09gkWWiPF915po5yj/F/rXQz+F/ffm\nvL4XnIzFI1dgXXDksmdrZj+OJy4whwBjlqyPBhDBzw1JLRpiGeGfzi9bIBUM\noKeCYi99/5hAswRRXKlGbmbBn9jHr4o75AOWA25c+35jAL9yXv5K21gruoYO\n7atMtyGtL18Rcam+1ZRs/IKkrPT7ysGLZ2oEjecRAM6uqI0n8fJ56ag+KCli\nUg8096c/8ubZfXbQ26thHDCyM0QBs+8HWWcHbN00XGuIzwBJgFAavBTdJAkc\nObfqr/PYVJ/DdmKXkiUBar18e3g+nVtsgJrOmM1k8G55iDnIUONGmp8BDuCp\nJ15q\r\n=0X4o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHgDtN6MvjTW56R+xXa+a+9HYDZnPvyleSUbym9ABrP1AiALTPVWXnjOcvw8TxOM2aEWBedo5kljNmYUG6UOiSN3Uw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181026092118_1540545788609_0.829020260752438"},"_hasShrinkwrap":false},"1.0.0-master.20181026112632":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181026112632","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181025105548","@atomist/sdm":"1.0.0-master.20181026095548","@atomist/sdm-core":"1.0.0-master.20181025164014","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"6324d053bf13f743d7035cef3e80ac9f4bf8f014","_id":"@atomist/sdm-local@1.0.0-master.20181026112632","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+shKUwmA+C/BiwinHoucwlrdn7BidkjHcs5xK4PLPrRhFEQsqMRht/P2zF5Vm9PvDILHdb8yorD3a4e0PPBeDw==","shasum":"2fd18cdd4e126f44f80d297626b0f2f4f3d6e3c3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181026112632.tgz","fileCount":354,"unpackedSize":1289870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0vplCRA9TVsSAnZWagAA0KoQAJTvpA09wJPz/PPG4naa\nL0r70rykRM3yPy7QJq6Q79pP0vAF4U+YrnFUB8jStLeLcxuk1C+aXTYn5XIJ\nR3OIOC9ktEl3ZK1oer2sDv6iS4Got2ItklJUrdEk5TB78Q7XgvJdrHEvm5IH\nsZ6tXU57IiHRKEzrlpS4l7JarKSEzhrct6wT4flUnnjTvBRP8rdcMc6Ol0vN\ncUzRS0HbcbzbipaY2/hbIspPMU5FQla1hpvnhNz55lRQiqSpXjTwvuCNoKFK\nf4H8Q2c0gglSZ1uoRZTIXC6dylOjV0fyeq3yBjMVA5Kfp2Unqy8+s8AqEzCY\nGFZ79uhDql62Oi62vTHyjndqKviZUl7Ftd3gFnYVQcvlWbG2cDhcwgfUmLW/\nt1eE2ypfou3htbjkxk8eco1ftphRKoMJyyYJ/hCL6syUzrnNCASZdM65xeDJ\nxgner4RD71L5wQhOmZT/hZmuw2WGR9wlQKAVf95szSN0lEb5uFzieMqkeiVx\n2Z5sB0FOXyqej66DkAQx/U8afyVAmz9uJWB5ownZG975i6iW2HSaTzsuSWNU\nJVg+ERgID/TWgWqyi3BSUTEbKGYaKLrBxgguTAVPtaKs18ZbjzVOTrxNJNDE\nB6lSQVBzFltGNzO6r6F4jKB6Uw70Bct34PoOqwibhuVHuLP4I+I2HQydAVpu\nHwsT\r\n=YDvm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6znsACQmgYmAzu+zl3mx3lecPerHpnmR/+sS9BqhtVAiEAuE+5jMy7F93a2QR3WydnolwR/qRtSCWGX/56EwAA3Zk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181026112632_1540553317286_0.6784285161615597"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181026130545":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181026130545","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181017160341","@atomist/sdm":"1.0.0-master.20181018153716","@atomist/sdm-core":"1.0.0-github-actions.20181025204359","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"9d02086f7e2e44da9a535b8b9ec31c0ea3d62fce","_id":"@atomist/sdm-local@1.0.0-github-actions.20181026130545","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ZLmiUwckbUkCQE9oDvB/t+Echm1dVhMSOEddXtfoVlnXlFK4Q4Gq+aeyW7TeAAy9MLrrmtUJkrY7mb4sNtSEjA==","shasum":"068d7d4ee635a6d06809c9b3b531187730c3c0c4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181026130545.tgz","fileCount":360,"unpackedSize":1307986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0xHKCRA9TVsSAnZWagAAVQ8P+wUeNl53Jev38+gL8YlQ\nvrbPbjf613cw+ij743PYbakMkXv1LNuN9aPnWzySKlySjIPbL695jDAvmX4q\nMxVTk7fXhk8GHzDb2PqHZZqw4r6F8HSyINNnSB3Y4lWSWyzT5r+MI5hbPTUh\nQ3hzloVMV04BGlASLY+jNqtiJ35EkIC/ZTj2U2A9K1QaXzEFFkwwUpgY7zxj\nhclTG6liHOrLHa9iE15v98PDZ+49KNfFttmTqtBfaoP4vkNRT5nUvI9MY6U6\nVMlwLYeAbHswbjU2IAH4I7CEf6V3/mtQg2sXQKaSBVAp98ewTjrBVhoIGxdM\n9KQWAZ30QQYdxAO/pyydj3dh7ptQbeY55YFCTvBmvw6xueCre7yO287BMamh\nLydcH3w96ISWjhePWO2fHbVjjtdhldTIP3ZYBgO46DqFhdYvRxDlCfYWdYIS\niFQz23eUXX1spUsZaxzx5TacOM/N7d9kuMNT/Zm54uf61P2Wk2n6ksxN9gZX\nsmkA1KRAxr/0UMOaLDR62VuzXsGX69UTefna6ggcrNR8/E1oT/9r5pobUW/b\n9MPGtGU4aNQH7t8eNhUNgtNLE9EnEKIo2vd2tnyseijRiAAizsBkmxoEKSNq\nDc0PgpNJ0aIPR8HnMBvPCQzi9WyyFilcDgVsIww7hlIpEA6Eahn4D2Sabn9S\nB+Kf\r\n=Bhe2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIASiZcEeYympkBytOTqQwrvv2P/u6W0a7iwxvot5H9kyAiEAoVx81hmy4GA4HEEN0TRy1baXJ8BdBomDbPM4cnL6mrI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181026130545_1540559305809_0.5664775707647274"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181026224605":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181026224605","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181025105548","@atomist/sdm":"1.0.0-master.20181026131748","@atomist/sdm-core":"1.0.0-github-actions.20181026130543","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"6bfb77b163c377949dd0aefb517f1bc2b38b9a16","_id":"@atomist/sdm-local@1.0.0-github-actions.20181026224605","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-BehFMEljajxhfDjqhMkAJEvYxN4gDcvDVxcitGPDeDbbt2jxzfyZFxlLx2qSLRcrbBkWeP3r2mphiEG/4jpJgQ==","shasum":"8b8c7d96ab428a16b67e5f250ccf72d58ae4d539","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181026224605.tgz","fileCount":360,"unpackedSize":1309938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb05mSCRA9TVsSAnZWagAAypoP/ihttSuUf9EwPxKryQV9\nWJtGgEYbezJ0daI3+LKAddZg5yNSDi8b2ziLQ/ETcrQ6AdMrzhyuK98t9kSd\niJCSdhaX6ZKvkl8msty8l+WfmyaIi3z82DdDeC9xynIQpKqXLDxlvWoMxbLF\nH2AbXYYdSrn2EvYfPob99a1PGxbvme1jS8n7h7U2/eJvPmD27J5dpoo7IRlr\nUnUgODh54XKc5ALeJy190aOpW9BzujJYjXa4SnTbaemK9/GF1uzc2Vjid2nn\nFKrYDSNA1cfPquQc/u2/nooJHxWv/9WjSE2pVzIQrzVk1+HHWI42qy2hcJWY\n3NbS6YT6M4s01sz4IZ94/9OgrzW/6IfyJOdaVt5I1T1VZdp3cRUoD+wuKLQr\n8Y7ejgWEMxud58FZEmTGAwoQklU+hsmnWpwUCjTyOWQ2+ES25hPG4kgMkN5b\nnuay3IUfmWpL+PEISW9lakiCj3fCaPQ5JRLlqoO5fLQpWc1OgqdGNVC6gQB+\nPWgNX1O0PTyzIVSRUqVAcy0z+Ezf0j6UExLrUprZAMgBHjm+wg4IepaR4/mD\nkhW6tyVsX/UUCvJ4iH4VteqFz/OxNjaVXE94EJMLfGejmPfCyLaMR2VHUuvc\niD5DuckW0ewWUbL8krbJ9VevUlKJcrf0lg4cK2EVcQl6K0hnO5ki0qbsNZz1\ndfki\r\n=kHKs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICt4ZgJBKkUFe2RWygYQhT9gJ6EXY80XoAHYbAulmrtlAiEA+3Pzq/Fz99DMJfOdeT9LwrR70rwl6Ug4xltbrNyRbV4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181026224605_1540594065375_0.29257860255117674"},"_hasShrinkwrap":false},"1.0.0-github-actions.20181026233403":{"name":"@atomist/sdm-local","version":"1.0.0-github-actions.20181026233403","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-master.20181025105548","@atomist/sdm":"1.0.0-master.20181026131748","@atomist/sdm-core":"1.0.0-github-actions.20181026130543","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"e07747455453705ee2526f70fe1895512f92551c","_id":"@atomist/sdm-local@1.0.0-github-actions.20181026233403","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-SF5wns7FaU7nFceGe8VH3ZYXeKNPW5hyALSShQOzK5yUPqcLjbClw6ZreKiubbOdYP9uNajRSHyVvryEAYMDmg==","shasum":"aeaef452729c1bb7193afb775dd81102120c5af8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-github-actions.20181026233403.tgz","fileCount":360,"unpackedSize":1310448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb06TQCRA9TVsSAnZWagAA+yoP/jW+937RTgWv2fJPS/T6\nIOF93cHu2kgO8/qlOl05N1rxLV1XERKaRwDIGW02Mg2bOr/dlKZI+TOMHagW\nYPPfI3n77PvqhDU8k9pQxBmZnNcWpYH3RXuymz88Ns882leSP3BVnta6eX0Z\nhk7+ZaOqjj1RnMaCsdQ7rFiecQQm6MX81CkADcDjG4Lf3ewoL7kSoW2EihWE\nx80N7MvZqx8tjZwxH8gkoB1numlffx13tcL+tbNAi+Xw/Wjj73Y8ZwxBFbtH\nxh9Wxpi1E0gNfQH01uM+oXR3mRRcCpvOvbwn7BHpUDr8K3lNHIs9+DltrqdX\nhyjfxube3G7Q5XAGOArsVtoqZEU0gFsHrKbQZPMzno+XS+JO/XnvGQKbJlI8\nWPW588/i7Qt08nZ2EtYmGpGgthtVY50kDOYWSU8u4a/gcwiH/WdGaXriThmq\noNdx27tQnUdb7BMPSb6akL00dEwmQVEOeTuttNhXIxyb3GHvK+/D6/vrysr+\nwj8nsSsGkezlgTlUnbFPpHJiN05LJCLAvbJuxAhLTzvIsfgPWZ9Nr1X2pO4R\nMRQEergx3UZxjvwY6zCcTucfrpQepSW01z5pPLTe88yZVhFX8YO0HPi1FWlx\nCg4TJPdbSr6ZUf6azTyJ13eKLMbCNxLClXwrFdwE7muFG3sKavzpJxYeXhJh\nPsmu\r\n=xvT+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSJDPaK3ystIpkie1+8gFEa06RI7XsFWB5iNja7UoyhAiEAqBVRd97eQUyIzEP5MhilE6b/jbYHT542UmvLO6LIxiw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-github-actions.20181026233403_1540596943721_0.12117164685597737"},"_hasShrinkwrap":false},"1.0.0-atomist-update-1.0.0-RC.2-1540911682164.20181030150239":{"name":"@atomist/sdm-local","version":"1.0.0-atomist-update-1.0.0-RC.2-1540911682164.20181030150239","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.2","@atomist/sdm":"1.0.0-RC.2","@atomist/sdm-core":"1.0.0-RC.2","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"6bdc75fa31b7566cd162d756f65997e62afd3332","_id":"@atomist/sdm-local@1.0.0-atomist-update-1.0.0-RC.2-1540911682164.20181030150239","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-2ONBpfzEf6YdgGz3f1FeGI2ApsYwL23DOKqsKf+5+3ztwDqUVhizi96q97hKdjHdA/1ChAjM8PaogtcFppa6jw==","shasum":"f75e6cca57e8b4257088b3e17193f64497c8cac8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-atomist-update-1.0.0-RC.2-1540911682164.20181030150239.tgz","fileCount":354,"unpackedSize":1289852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2HL1CRA9TVsSAnZWagAA30gP/2NlkaIFHrnmrJ0T6zNP\nvq/SiD1LCxeAEQFbMw3ruTA2qD2CvRZlmxDdvK/CMP6zS2cFxzSJfaW62Khr\nSgHgYtwaX4Q5YYa6zvhHa8yc0keUvnNWtmqDRBAnqmcCu07No7McRKr/r/eB\nNOZ66qtQc03jOJ6TmxVCmwcmViPy4LQ5R+qei7q0+dpFtklRYwlrxvMG4cjM\nlbNF/gISonz+J33C3kYgcpiA04EFIghXahh71hHQs8cTOqpquR/XqtAIB8eD\nsCZIKiGwptnHcYSnG5xGlHWAWSFihu0CUERgGhyHF0r9Ra+iJGCWZ7hGJhun\n1gkRrKkW4irKIvKWVZbavNBBu+JB4jG6kzhy5CLfEe93xaSkuByS+4p9MbHV\nOaxHgD5R5FxMo3aViiwE1oXvzF7Xig4/WTUkS/C0Z7hoAPw2SQ7lOryNp7nQ\nNhM24e/dAXMno0HR6fNFUVUb9eVVHflZvWNi8t/oJFpSN747lQX2pe334AL7\nmNSw51v2g5hCgfifcnkfUf8EoGq1xmetecmsOMROescTFTYi+YqxBs7JL5uX\nL6WD4+NWB/Ejpu7ilUbnFSdvfsZg99tRV0XGoQqbaMNc0wepsJ+SKeglCkpY\nLorFrtoWd62fcg3OuJlFOyqWCfV7fco/n/vZ2v5hppr+ZRskduJzzznr2FGu\nyK/D\r\n=knSs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGkLFZXtDJXzGDdvOHboDhN0ObsYv6SuiPJOAbjmyZFSAiEAlKfQ6C2qW/6pfXDeNCOLZbn2Z+0EAhr+FZfWdpAH1j4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-atomist-update-1.0.0-RC.2-1540911682164.20181030150239_1540911860895_0.8551375206236433"},"_hasShrinkwrap":false},"1.0.0-master.20181030150637":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181030150637","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.2","@atomist/sdm":"1.0.0-RC.2","@atomist/sdm-core":"1.0.0-RC.2","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d3b49517d40cb05e16d00dbb048600d00963d476","_id":"@atomist/sdm-local@1.0.0-master.20181030150637","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-41aPyuqqVbYp3mXAETN+V6qPqo+S5Cp1TwleQN+m5t4k1TIkzXfQGEnu96MoLtt5fQbNSVGwMmwN+9KXagdhAg==","shasum":"fabca88f4d099a8c57fbb3997e95aa32c03ec871","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181030150637.tgz","fileCount":354,"unpackedSize":1289228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2HPnCRA9TVsSAnZWagAAlj4P/icl+9enwA9O902oXwLO\nmrEvY4aQyVpczcuWt+sR/iYbibHH5XemFdRVVs+Art7XZcgYSsvGVsvM5JVv\nzZc+O82ZwYPF5KVakSBcSJH/P/37Ia7iIBfaDXq0G61XyZYYAp85gS7eAo0i\no6G3L0fKpFebDPvmf6N1POS265pGHqQMYPiISfMXcFSxYc/73MsbK+STf324\nkUT+c/3SBvTNpLn/OBbJLOICFcJSSxMRJzYWmDYQ4vCIOOo96xTVh3xddI5b\noOOFYLp19Qcc02qca9VuPMKP+39ISKsTLLj0QgNdVih12DmZXyzs5ewUG8Zl\n4NJs5eCrmKroNg1QWK/n4ha8MQ4hwtF23PIpo4nuzNniTHTNHHRgaiKNdKKX\nrEqg1e6+9aJppxtWSnHjNUfLOiCJqDIQx1wegjwok3kQPOCAez5sHAP8tFH6\nxD6IxfOnfYqK5Jo/1BL8ExfOc6x/RqFTtVEkoQy8cJV5Un2Tn4qYQCkq79B0\nhApiIwZ4QnraHUvFWtyDD1Tyi9XHdm57WLT/9CVnfQHJHASG6nhMG7qyOszW\n80K3U6USsAM34p69iW8NmRIbl/+ZKddhb9OgPQbp5l5bb7+Yjw0RxC7sfSls\nj6dHUeFFJ+F3blt29a4Su3/aI5b9weesuDHJGiUu74T30kXmUPXhMJFal29E\nZELK\r\n=PaDx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC92nP4rVc7k2zkXVtA6WK8ats7Xx8MXkWs0ukwjSMeCAiEArFM4CcXYwnHsyaZfgejS7X1h0MCNMlZcfed6GcQhQZ8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181030150637_1540912102372_0.384249806364207"},"_hasShrinkwrap":false},"1.0.0-RC.2":{"name":"@atomist/sdm-local","version":"1.0.0-RC.2","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.2","@atomist/sdm":"1.0.0-RC.2","@atomist/sdm-core":"1.0.0-RC.2","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"gitHead":"d3b49517d40cb05e16d00dbb048600d00963d476","_id":"@atomist/sdm-local@1.0.0-RC.2","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-3j5pXdt+R8ZSo9rfrqVed9utxNGnGts9i7epZdHd8dv5nHAlZrJ3GyKlSHOpfyuvweFl2kOIYqiK3u2gxTdIoQ==","shasum":"1e0c14346d5099c90427da89f03fd9e7edcc7fd3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-RC.2.tgz","fileCount":354,"unpackedSize":1289211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2I44CRA9TVsSAnZWagAA8ScP/0DnAzCnt6TNH727vXaO\neIL7Fo8sNmzN2QcObgSfZR0mUlNGvPkD5FEXzF04RuY1IRBzye3uGesbwP7c\nKfB6rM1/CNhMniIwX6CNSN/RMAG5flfUsKNXeFZ8qZ5Cr85OQ6lESE6+8OaK\ntVw0GrgQM2+Bz62nw4Uq1KqOJ0Z8QnSa5AHvqUbdcZ5DOnLmB0i+cM7e1M3D\n95qFcIkK0DdSnt3MSSjTIwVUQM2mkJ1+Z7+ximK3uKpRgKnc3eIUtxu0N0kl\nnoz3RZDBMul4G3kmD19qfjDM5SEkrE+SjvcBP/Xa7ZZjeax+2vNBm75vdqcF\nZs7Jr6CyVjvAoCNOCo4Kk5wvOdOSdAWu+FFOpnjwy0StW5FvKl3TpLy25FlQ\ns2CbakdLWvPCMbxJBHBqVEbK3tmteZk81CQF6FVY3ebV4a+RKY5lu1sdV9u3\n5cybKg9hI6GwvY6aQTdnPJms3/VJhwA6oEcIDL7vqSrFrWgsOcT9lKO1uLG1\njaHC9qVpK2jH2b8NC+mf2CJPvmNTJFZv/azXZ4aG2hBlAVJI2xo4FPBRY56Z\niJioaREjPsVvBujDbw+mKz8KbDvjkBAbfQJs8reQfPTVqZOD8LrYHDA8tUHd\n/zUZZGN9RDCgxz4Fk2PIanbAYH+1h0wNb7nmK+cgvp5rvK54TBBzCHDunNHj\nizpg\r\n=lCkG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICijcGj2iNZPxHrgEahjdFjkQm6j6tcyNy80/ioOKFsMAiEAspGXTP6d4y03qOuiQR4Nta0iWDBFsn04PDcAC1ydy3o="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-RC.2_1540918839721_0.6545499131136925"},"_hasShrinkwrap":false},"1.0.0-master.20181101103545":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181101103545","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"1.0.0-M.4","@atomist/slack-messages":"1.0.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.116","@types/marked":"^0.4.0","@types/node":"^10.7.1","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.0","@types/strip-ansi":"^3.0.0","@types/yargs":"^11.1.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^1.3.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.0","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.4.0","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.17","serialize-error":"^2.1.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^4.0.0","terminal-kit":"^1.26.2","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":"*","@atomist/sdm":"*","@atomist/sdm-core":"*"},"devDependencies":{"@atomist/automation-client":"1.0.0-RC.2","@atomist/sdm":"1.0.0-RC.2","@atomist/sdm-core":"1.0.0-RC.2","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","nyc":"^13.0.1","power-assert":"^1.6.0","rimraf":"^2.6.2","source-map-support":"^0.5.9","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.11.1","typescript":"^2.9.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"nyc mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"nyc":{"include":["lib/**/*.*"],"extension":[".ts"],"exclude":["lib/typings","**/*.d.ts"],"reporter":["html","text-summary"],"all":true},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"47e02e656f2ce87ab03bc1073d6c0631bee60a5c","_id":"@atomist/sdm-local@1.0.0-master.20181101103545","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-GWNtY4uYgTCguGko//ce0uFUmwiBDVKQutaNyInL4xUv+s28k49RxFp6e6J64HIlFvRt6kH7uovroqcf3dJl6A==","shasum":"edc69c392d8f6fe35dccd0553914a73d319fb0a3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181101103545.tgz","fileCount":354,"unpackedSize":1289311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2tdpCRA9TVsSAnZWagAA9WIQAJH/UlZtl6vNGjU4coE8\n/DWYSZHwFcrAMSHyavBE9QsWSDCLpllD9K97q0Na4eNvdGaQijha3z/n/oXK\nVVvNZ0AJN4O91MN5TEsX3gNIDQ6Rr4E1oXZLwzl1+NIl5dv23R4K5H1qk0L2\nj7ri/mg9pLHPVRq2ZvTCoADgshgnYSgLpCWLy+TrywHkPj+Dc0fnaJ8+XsOb\nDf4Xfj0GvwxN2CohNKOgMeRkvcJ0lwtjr+n+qAEojBRZtjsvgLZKvTxTOc+a\nuWITPZQrQlwh4XG+JK8QoCyxv0dGpOKT+giDn3hyjTCNx5y99YQHRiLNZ/aO\nNxCo5x+C1dzvYX+WdbDj7CxL05LTmRsKqgcVEee1+P+quD/koesxwiHeFUef\n5svS0v7WbWN388JrEMvSzsB9zrJ32zwTxhhxcAUfixXQxhj3y6XG/iaZ98R7\nfun2GF36Yq6FuNa653z5Hv7k2ORywleDFXskxLRPGOqM5IDlQCfPAtGHCpQC\nUlMRtmPFDtNSLIjbhiTdzQnR52tn4g3Z3DnOLhVPuWt2cDNMv0f0/+y5GhuY\nZEtWIGPDby8XT9f0LRnLIOKXj+HKWtkegq8C0M9r+t1mLpXhbVLOvqJDjPHG\nNX2MZIZxGofzZK7plzlJFID66e5Rvafe76+4EsiQnnwtz+Zjmph4/uqZMMWz\nn46N\r\n=w9W1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeichpfKjQNCIk3Gd5eHtsAd2j6PWovIIjJ/ns93kJ4wIgQNzQQdrMz/gi3WJnjpOc8FS8aF6VvCxcn/j8fBmkeLs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181101103545_1541068648226_0.6028571088438093"},"_hasShrinkwrap":false},"1.0.0-master.20181109131933":{"name":"@atomist/sdm-local","version":"1.0.0-master.20181109131933","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"061ea19ae162d718eeb4bef4e52f39fd102cc864","_id":"@atomist/sdm-local@1.0.0-master.20181109131933","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-zHukKQCYXfsnK6IbGKwWHJ1TRSovizj9F06R7HSFeR8/HmzLUYlLIq/oFMLYCuhTcC8lJPyhdgrSvxCQoEJzfw==","shasum":"f356bc4ff5f0a7c6aa06bc1cea669e486cb6c49f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0-master.20181109131933.tgz","fileCount":354,"unpackedSize":1292460,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5YnOCRA9TVsSAnZWagAAyAAP/2iBTkxEC0Uoypfo1tT1\n9m4+u1jSkzAn3MUZ/WDD0g3uC+C9BzFuNufOHG6B84VOCT9PseM2RvtRdiV4\nn8bFH8OmwFWsXnmuAkwwPXdYodVVlQz0f80nmxmJWJVf2blei5GmdDJLjWXE\nJKjY5tB90lXrjnG9bNO8iSLnpeyyzKlinvcJymicFX8uTACp66sGFxpW5/9a\njJgwvaL6EBhd5h67RmH8HcCYg0r5ST6hAb1AU62l5kggN/Oy7ZfHKiXkk9Ro\nT794tnvhZQUS+IezKVLWkx3ztSVxszWCmVc9tsQzpvoFe2KAG2CB2ABSXmJr\nW5xWRgbWBWrQ/+ZsfIQdmRD0X5dZdgxwE3cHB9dM5frXs2YsEQUgfMtVw9Vn\n7/a1hWuWXfzUvvWBeZaayEbBNQw43ddJ9BHAyALf4pQytDfxLk+8mBJz+sDf\nuP9EKUgDAPur2YYihpI7J6hfr7Wulwgj264rWluwSDlUGQpyYG1Cypv2A/Pr\nLkFmhjImsIxUfHXfgS2u+15UOiHOY/Ay5V8ad90m8up58GdJaTy2BAh/VykV\n1SZl7KfRI9iZR5JZmrB6YNcydRmIJXOJLeLB7CR0JWXrFaTLOSeJ1drwhq9E\nzwJwvT4HovdFd+6o2I1u3V3G5vA1++ko0APLlFoT3UQ7qxDiDw/nz0H6Qz8L\nPdZl\r\n=ppXY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMWIQaEfMrh4mWnVo3wGC3kk/N5msz6b5lCJSk17OEKAIhAM96Jcool5TgKgF7wpLzFkgwuly42NRzmIDlYcnoFPcn"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0-master.20181109131933_1541769677603_0.1590106287813604"},"_hasShrinkwrap":false},"1.0.0":{"name":"@atomist/sdm-local","version":"1.0.0","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"dd892d3e6aef656922398d5cc55d63cfd4689e14","_id":"@atomist/sdm-local@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Z6hxCYxbyjiJTyFFiJ0gKluZmlZ0BfM89Ji2uHIa1CKRr7LfdIJFx7/w6a8OLvmS1sqHYpPS4c/O6+jzLj7uUA==","shasum":"a2321f216a13e304c36e5e93b8075b6924b68a42","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.0.tgz","fileCount":354,"unpackedSize":1292438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5Yt4CRA9TVsSAnZWagAASoEP/jeY7K5etDC5J4lJdi/Y\neCCo4c1OMe5Ak6V3FqznOwQ6oGZZZM+8Vv6HnZ7+e8nd09V5j2Mh73qEnH8D\nggt/Vs2g6y1Z9iZ6EXGaK7gCa/4A/dkt+zTDCtvHZlOFgGZfRtMjFRBKy61s\nGYX6efMltHRqF6deM2Sp4yHE0gUiRwlLJwT8Iurr4HDYb8p1oeNXuf4WtevW\nQvNkgIxhKlLa7YgeTIXoV8PpVv81XMPKIlF863XECZfk2Y4a4TiodCwWaA8r\nXD/I9MVjQkN7PAMz1UdS+zE7lgPzmcq0+eg0lRMFqeucS8pXCAOLzDmCFscf\nEhmkyoGj+XacrgrmS7MiF4Ci7ehSCb8Hugi2Tr0XLkU+bhfctpG4+m7wVsHx\nPeDxTMWiHlz8WVhwRB6xQLgt4fCsrBU49CQCqhFP27EzEgf81yrwwI2vmLq0\n9S1pfwjtp1wSiWHW1Uxqk/oyL3F5sfNfxjUDIORq4p8BC0XECO7le0e/v4SI\nbZuzBOG4mz6jBcZj4B2/SDvW6/Na/3z1PmSgWl31CIVkDJ5tAZASIINHUbPE\nAHBxDI1uhHcvqcfzPm4672XQEip4M8TJpxH0jUZKr10anPhW0VXoEnTsDZ1N\n3QvqRbiJ9slbg28nHu33Nk7mawoU+kxkNcKDA3sZcTsUB+5eaPdiet31p8cX\nJKhe\r\n=q5m9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDT8EHn4zDZGFZpkCez2BQbeeJfXMQsNB3LfMKFYJPZ6gIgLhZgD856WCJS6ZLbLfOh7j9TQPkJ5b0le1m61bml6NI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.0_1541770102902_0.8624679477971877"},"_hasShrinkwrap":false},"1.0.1-master.20181109133307":{"name":"@atomist/sdm-local","version":"1.0.1-master.20181109133307","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"920e1ecd3b8b6c962e8e024fcf7fbe30b175a17b","_id":"@atomist/sdm-local@1.0.1-master.20181109133307","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-kl6i0ooJ+/AkmOdb3OzPhhpoWHSg6eM5Ev+dl2fm+nd0YeeY/dQD2OPDIv5GJuzqzz53ScUVLdc8UkBAeoBjzA==","shasum":"0bb6b607dd090973198a458ee63e361c7090f72d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.1-master.20181109133307.tgz","fileCount":354,"unpackedSize":1292565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5YzyCRA9TVsSAnZWagAAIdMQAJb9zDqK/rY5CxHrcqPE\n0k/qedZq/CfRyQrKQRE2GYN7W5tdFSF/CcC4jL8zPBsBwfT4YVqC4Md5W17P\nh5hChEXjaBgY13DO29XMlNCDEYjIosO8zosUD0lkLPny86lFu4qJJUH3AuxU\nTl88hAocL20157y5wpd318sRNWWmBzkfXlPQue73djIrPkDh/feurZxe9ywj\nRaLQebCxup9JjTTmtqQwf63r+dXxIMEVIMzscwun4NUe7gYebzOJ6CW+fO8z\nUvSDTMdcqoV6sZ3NWPEiIOK1nUlPCIoi057brtPyuDuTVe4iRX02LjXsl4Ol\nsVxeho4iMctrBZ1BMgCtiZ1lgSgkDNzLJmIQSWwsG/ybsDfCOct8Jh527fBF\nVnK7p+gLvxS0QlH/IXWOWiaf/4lngNSxhTSjipnKsHoqpVUCyqEqHMd+0oav\n4NAqd1lx8o1jgFUAefh6sEAuFZlb11j1GPPXHiZT9meBUQpBnJKRhhxBZ5IX\n0h3w/7W3X3RQV1It0TjPubHCjeRpAYSqQN1Q+NUXZjGavIi0UDNaCD9GSnib\nvL0lHfPNhj/hDkYLgWi6l5nkNSyrdoqIRht4DwF5dUOb1VFjKwZ5BGX5DyYu\nSTeMydLSg/MG7KbP72cO5cnAgGXVRe6WcAUpW+kPjPjt6BhJYOUvHT1V9Xu8\n43Lv\r\n=MTwv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLN5NQ51h6E8PIFYILUVdwcJRVGd2VPzzYgRRpexTPvwIhANZW1+iCL3E+P7T+8W21HK6sSrFKU9S8uSnxqNXsgk8q"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.1-master.20181109133307_1541770481524_0.6023618514343243"},"_hasShrinkwrap":false},"1.0.1-master.20181109133714":{"name":"@atomist/sdm-local","version":"1.0.1-master.20181109133714","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"f955e8f970585085ac4217d9b79ccfae6aa506f6","_id":"@atomist/sdm-local@1.0.1-master.20181109133714","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-djtPMkXfc9XCM7DN3Z7pRYy7Vig2iCgEsNRtcBKz9uX65sjpPzFLDZiYC5nfB+uqNq10G3FCjKzWSHR/IKM3CA==","shasum":"72f368351bee1095df68248e4ec4d211dbb19f25","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.1-master.20181109133714.tgz","fileCount":354,"unpackedSize":1292565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5Y3oCRA9TVsSAnZWagAA2DQP/jSIAz/UBNVfkVBIsTaK\nk7MGima+ppzv1d2a/3SQB1O42y3LqCWPciMps4lwZ2gAt82173ddLcFTQHnp\nCtiEr1ZPhgX1sYH0aKzvUuZhBYwxphiPdM1RY2T2O9DTXi8yGCDJ/G7cQKtw\nRBJtvACgg3u65JvjV7cZaJtWK9bQgitx4XZidRmyanF8pc0MnSibgXMAL8iR\nE+dYaufPwP5T6E8/fVyKM7bkUoBoI5nkAZ4MBWby/IIpflHgFSXlgJRXRkcN\ngmGB/s531uEWdaP1kKVlprKE+mee8sts1JDtt7Q1vbjSioJtCLR3rcSMCUPV\nYuCURzI4ugYX6gnEPjdaV9lNq08WVzYcqfEiezSqqo/os6yjH/xI0PU/OC+k\nIiO1LRVoIkQacUgIF0RbDwbhYlteOCS304qp6aJJ3hS9lExFqukzBg23xuec\n7ZedepVDNyB6kCCx48y+D9qrYGmxlD03wI2HZwTkvO9WCEnsb7UUIWXnzX3a\ndPNk0QhieOY0EgO2BhAwQLpm0xpoWXrszfSJBao8pYk1DMUmKgSFKneecKkJ\nX2xmZoWT7E4DPmyR9lrLM59Cmhai2bY8ECJbXSeWzadCYLOkomKG2GdVHDug\nHs+qAJZMz2t2oWYS2OYcnuEtCm+eJrjqdhu8MXXBmwywIdjtuksCKQHMxd+U\nceF6\r\n=ObPT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH+V1SamEiojmcFBqUUC1IaUKCTz8XudLQwymDY/RmyuAiEAqtwaR2Tueg4THRKcAbjESq5Q4H09TvNgNQv+C6b5Mek="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.1-master.20181109133714_1541770727777_0.024837393205725533"},"_hasShrinkwrap":false},"1.0.1":{"name":"@atomist/sdm-local","version":"1.0.1","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"8dd454a5ac492ff583f5ad90055d1997fd365a51","_id":"@atomist/sdm-local@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-2jK5L5gNYtMKGNkV5GEy8GtedgCUBT9diB8XpJGfCOIwsVC5j2woT6OvA4zw2vqEGkBULfB+0Dvq/1GT/1PE6A==","shasum":"b5516783a52e9fe8d38c6cce92f8c6d56fd649c3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.1.tgz","fileCount":354,"unpackedSize":1292543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5Y42CRA9TVsSAnZWagAA+XkP/j8AbEPaMnBYIz3W0AI1\nwcAQbxyqqKQPkZGzYbNhY7AL24r9JIVIMkdFo5UBVhWK25FvCuuoFmbGVJmP\nM1mT3P40zIs1UmvVfX1kc0SSZvrqIsuzLD5euGJPhZQeIjFhw8J+xvLuJql8\nfGhsmYwrdAX/To533VjmqZt0k4l9x1LUeYoSbDBkWbJHOsNvGY5oruTYNfNK\nSAMUoR8gK4QCeqbXWdr1NGNEUJdfwT9CJ5G1bjC/L43QO8wZCBFz9+JtGQ9y\nvNSGPYIG/S6GbGuBHasht6WKd3SFT+aKvEF4IwKZVGcEkbQGtd3Y7b/G40ZB\n9XDtX2MyXY/8BqzVnMm8eIr3HpfGsUTb6ST5I1b0YPvGSvWVvSPj4o+j3JuL\n8wuxs4xKMDEl5IkMjoC1AX15Rf3mP+htfH9+99w4c+TGN1gYMNckAhb5rZcw\nhyb/4qpRSwMG6qaUF6iKaXBfS9GzM4bHUEE1zs2xx/pm5VWG6ITsKgBP86cT\nlqnRnDvFHWx7NQPCOmmRjM3369Da8Eh3Jto5IPJohnHwuvELkK1dz+RevYPd\nG23QDjPtNb4Ijj97LjnYoT76/SX+B2dbRfQOQqekh93r41i4DbBHVsY5ClbJ\nGnQyhxx5XLg9X28N1qOtx+bFunYYa2iqVYQYS4WgsCHTx8O674m5OhksWXB7\nPeKh\r\n=ADWL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvlASrxf5GFFLAnlCufp6D8+Srg26/ICKD6hVU/D1lDAIgMhaSICHwPsPzGGUUhCt4G9/p6o/y/Of6A6bYmORVWwM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.1_1541770805438_0.81575155317402"},"_hasShrinkwrap":false},"1.0.2-master.20181109142540":{"name":"@atomist/sdm-local","version":"1.0.2-master.20181109142540","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"52ce6bdbbf81fe90a1bfe10d9fbb31167d7d309f","_id":"@atomist/sdm-local@1.0.2-master.20181109142540","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-sqSZM7HyDmmP1KCb0ZMbYoW+nHUJHDAfLSJGeTM2wPDlveky76DsU/dctSRnyQS+6+nzG103kFtogfrGsVGUHw==","shasum":"75f7cc47ee287cad7f59a279ea067555c277eb64","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.2-master.20181109142540.tgz","fileCount":354,"unpackedSize":1292491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5ZlRCRA9TVsSAnZWagAAbOsP/ihXpBmmc4k+5Yb+cq9F\n/KhmDQyBZ6UiQBeK6xi42POUcudVcu1FIWU/MU1ncU/huGSoeiVWl8UcrncJ\nQCpXQM/Cbf4Tyv8tPmwdPdM0DodQz6r/1Q2XGdETvcgT84SMgyLQUr1uBGHB\ne7oBGiPTV6QsVc4HHGC6Exa9UZoUIfUIurtcRXwf28A+hC4hgvCdqSFt/fgt\nC/DgBkfw0KldiDOWNGR5nFXEuzC0oe0+DiAluN0U02Pm7GhYVvgnAGUteAi9\nPdOfXMeDS/rgBPel9iAtR5tALSr73hvZGTofcO9E2evmBOIi9pNcpFN21mwU\nHi3Ys328D1r6RWyIQlWH0qZIQQc77C29LzU+3jSKm8+FGr1Mv4yJ/anB1xIS\nvH2e/oWh9HX9SOM3bcFN8gd77wyz4JqXqp3X/pUb/nk3YccFD0adAsd/LQmH\ntwXKTHsuWi+JBIfgmIqdjoGFGh8yzV1mGYtyjZR23dxtxy4oHFsnCjJre09s\n9QTy7XbEty29GEgC4U1sN5RqD3gypKOqW9cpk2igPs5JNcDA7ZWc+9X2OPeD\nfszI8xnKSju6NPhWQZrQKI9HJxtAHh4v3GxHRKfwSxpknOBZN3gC+L5FPU9k\nQ6ybqYLDvkX3xYjDhwD34BbKzzDZVO67+NYuJnbgeK9IsvnkZRcMPl0tn0aI\nWcB5\r\n=Li+q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwy2fH1s600etwlHifB6vHOhNeNeYaWO4awlZQn4ZWeAiEAldbxCfFSjIcItC5VQ4Y3Kf/ecwBBjirGmGJWc+/qNls="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.2-master.20181109142540_1541773648659_0.8642243645696017"},"_hasShrinkwrap":false},"1.0.2":{"name":"@atomist/sdm-local","version":"1.0.2","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"c7ff9119490274b144a54ddbf9c599240af4bcc6","_id":"@atomist/sdm-local@1.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-cwT3OUNOUYaPdwsKCDel5Q1SvE8giCITl/lmgb6/e/EFEUQL6pUWUCR5PUlDzI1MGdJzgjd9qsgXMgqCHDyBWA==","shasum":"8b9d6e8a8c5350971bc0f57b3fe953b5d8707070","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.2.tgz","fileCount":354,"unpackedSize":1292469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5ZmNCRA9TVsSAnZWagAA5BcP/3Oz6JyAgzl0UY5wlRSu\nFWROFGjhAZWj3VhgOKv+epmLVS0w9wWK6ntWiXlPpqJDgUupQNXbIOBfmC3T\nPXIS4xlhlVOP/r/WbBjSMniGC50TVQL1grjhesgFy/0PaDbPgqCgViSaOlq4\nUNCUQyN91EnztkahD9C/sYHRKFIZmDXhT50KjJREoa49e6dpuo2pfK/Am3bI\nveQ+x8yLmQKBbCvOUiIukLzuf3F3Y5kK10+qxKKMSZtA03aFBn1cxoIdQq72\nMt5zbB9T5sA+r0OKfjVuEXAnwjHZxtBOp2EiCIcNa+78hMNyUbIM3Um5/lru\nYSnI5D7GgSaR8zwiAGalznxzDD8ZvuAckCfh8Nl/X1TmPhvjOeSfEASds12n\nKy3dpmUkAl1ewLoVP7uUX3rxK6av/WeeIklhusCmW+a6VT4OFvWfkHRtSgQE\nF1a2auqw6FbhDexbRwebdZlGiw8K4SS0vzqpkAy7gy57s2K5/RCN/3GpfQ95\nOGyBeeWllJ2NbcJJax5BSvL55xGmK5a/FLAvAkcIZo1rQfB2YPxpjExw51uY\ntZfL82/ykjtLvQ8N0UPvT5Q3zSohhJzSpIVXzfTrOlKE0dzAO1VXMy6K6HGq\n0ohu3/ZxoXJz8EDKzoxlnGj3oI3On7yc+Y4eoV7ZWhCYD0/dNgp25yKlS7Af\nAfRa\r\n=puJd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5KkB5zPvkd/RqV0XFPvk/gtvk9FuNhtsyUeO8oUCfpAiEA0vmkSwdBMyFK4DCvmJGf29/K83Nm0RU18NOd3PZPB20="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.2_1541773708727_0.00025036468408390355"},"_hasShrinkwrap":false},"1.0.3-issue-215.20181113092657":{"name":"@atomist/sdm-local","version":"1.0.3-issue-215.20181113092657","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"903ead91763c40c8df244b27f3eaa977f26b4906","_id":"@atomist/sdm-local@1.0.3-issue-215.20181113092657","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+DSkWtykZIPKmhvINf/It1AlGVWY6KBB9ETxod8MOdc/linr03LF7/twshEBtqMpmbe7ojAfIx4u54k46QS+Jw==","shasum":"5b6f81fb3ff02e9c0554ac62be747010923a73f0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-issue-215.20181113092657.tgz","fileCount":354,"unpackedSize":1293906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6plHCRA9TVsSAnZWagAABTAP/RkBqJVkInLMcfcujt6Q\nJFigqk4crXkHtyCUA+78v7kV9r8DsnqkJydgkIb2c7RftJEw1BqEWn95lRBZ\n2G0TrU/JzrhUsRSSikT5OfC4KoYjUDilMoPDpPSZB5ZKhFaf34SP9GVqWZED\nNhs1b/gL3U++st47Gzi8APJrNo1vi3jE6fX5g7zSAd4QfHbRVzddyJPRxhwu\nDCp5+W3Ks1ZKNpVMbIWIfRA++py2wY/Xu1LsX6ulWoGoX7+p2IXJn0ZILnLs\nLWC1hOX3tztPS6+7bxyOcUoiGkjyXXKsFtGcSTlmUeCCJQHwW8YId/Poq9+8\ngBZdlZlIKBuvNns2BDYIcHBkaMiKyuImerkrZnc/CBEks8/IxtV4Ww3HQvkB\nYGWBgvWOfrEU2GNRnZv5w+Hv742O7z8irlOWF/X/Ozl0G0bSg0Wt0//SKjIV\nqK10I77wrmDa0PzZYX9qGKQZgV7j+5+RsTUGd+24XPmTuqSThNsLXHe1VeBY\nwNnii/Uey/tLZ+StQvlCMofA07C+++ve3EtmFWy2bNgugbqQcnLL5mMXpkvZ\nLOiGRslSqDpOTvB+Sve3G96TtxLhDsaOjpVH2Almx9k4ARli0CKsRG+RbhGe\nTte9hIb4J0y8V/CbkAI0DQ9UZifb9gheIMjHP301XXQdmK4mVTkXDblv5aE7\nVNlL\r\n=7juP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhPTByTJ/32a/jiDCsMMeUQYLbUyzCoCtXo9Nq37uqSgIhAJgPvgAIW2v6NZxmR5/4Foghx/e7QY74BZ7Pokk/k4c+"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-issue-215.20181113092657_1542101318920_0.5518182550470216"},"_hasShrinkwrap":false},"1.0.3-issue-215.20181113093717":{"name":"@atomist/sdm-local","version":"1.0.3-issue-215.20181113093717","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"0dd370e4b13fbbfc9defe396b568f0e76d0629ac","_id":"@atomist/sdm-local@1.0.3-issue-215.20181113093717","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-mkJTm9Q6vO6+Hho7ZS+5J3POTXwkWxePh4Hb91eyEvpaazWsp++2yuY4ktURnu1GpXe+w0FExGHAkyJ5vHJ70A==","shasum":"30cd317b3e225202b0410868da005b476ed03889","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-issue-215.20181113093717.tgz","fileCount":354,"unpackedSize":1293834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6pvSCRA9TVsSAnZWagAAnuoQAJpM3AK2hYd0+Xpgyo1o\n1RaRB/6igSvyYkJyevKyui6nytK/vqh359ydkeIiss0l1s58X4Frp9gz6Ntd\nPZK8PbuqFYIysNe5DzumSD7jdnsKeYcidNicTx2ZF7Evk8dMWnoQ4jqmapTj\nULTfX3yWchq54NtBgI4v4Ybggy+LpD2G/DzSOWtAarL+cF4TbQ3MZPheFEM2\n8tUK/wp/KTlhR7MTYGDOF/Ncqpy1ja2TuiZrANAi5Cen+d+KZOd20ctorSzz\nB+c+rpi4DiwPGkmc7LmchW6UqzFCebOmspFOULQL95EBAv7cU5E0OgUSkvpf\nEvYtIk3PGrQz6rMwxY0bEO7XSm8h99W4sBo4PlxjVY0h1jtASglpu3kb0OXq\nPKjUcNUWnjyC7bnNOXkkRQYtVB+dbVdx2cSsSvQqynfHS+wsoA59KKHC8VHm\nzqCj8zkyKWs/3vSktVNa7y6EY3w/Dsbny45FUqhL8GetYuCXRpfHV0PzdAQ6\nzmdlkDVFh0xMlyGQSLmXaY2rWx66LrVSj808JOl25Do4aMl+OBcxOCD32ooc\nzwTws6OPfQNL5hkM8kxwMBwK7ubN2Zt0gGLHDFzYAuCs+S6EDW0dWnQVUDt3\nEquHFAjoGn3P1Vz7CYmFuKaCFDH2evqjebwd3l92XJVqqgzbSj8z/HAXBwm/\n1ohK\r\n=Rg2+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8qdk2MYSr729vrbwTEv0jHsCCKn2+blBqSmHtMtr8mQIgZt/6G6fpR9bGF/EQKxzpNHqzbFfXNKNXlssJIbVapPc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-issue-215.20181113093717_1542101969989_0.12934902945973814"},"_hasShrinkwrap":false},"1.0.3-issue-215.20181113124134":{"name":"@atomist/sdm-local","version":"1.0.3-issue-215.20181113124134","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"786d8825b99473bf8ec8da826d3b0cd40946a882","_id":"@atomist/sdm-local@1.0.3-issue-215.20181113124134","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-E58/+OOtAWJvGr1O6urQXRr90cUtNwJVac7UCJPS5mPFxGQRyiLIdB0fKymWGhY3TBlDxyZMEIxwLr055VjR5A==","shasum":"811825444814f0f16f5648627c0d69386458a5e4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-issue-215.20181113124134.tgz","fileCount":354,"unpackedSize":1293450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6sb9CRA9TVsSAnZWagAAIrcQAIauIam2ph1mvvP65j9p\ni/IC9S/Jy/xboW4LOw1N6XNEyy9Dlb5qur9f5XG1isQTA8R7MF16+brpfLUg\n3g+/ZBH+4QliOPdrMxj6F7gXzi3TioVW+g6zKiSnVA8r7wACz02GkzCylmge\na+vf1HyaZ3F4h16KVeuXylMNyztptJTwODAIj7DqwcFkMrWqoyf6ZuQDYsh/\n/l0IVOw9Luy5QcSpnU2EyrACtWz+bS5CdDiOmpItDNx3BgrkmQiyptzZFDFF\nhGkTKTBgtrlQBO+30cjoYrCjbZs3BLzrY2aMiFU+K8Bh1iwob9YS+9lORjr8\nRGlU6kRozJ+CMRWsbrzujjGXRwWxMSw+PspXu+05czM/AOM1og/P5GSSGg8b\nOr27xZ13VxJpMkMNjkwfNbEzU37r0ZFtzhXTw5pr/21BHuLOiYletr8UZUF7\nsULgTnT3j9kikOGQqHzzXrNsUweYxMOx1soPQphSleEvKD1DwwMhB8YrKvIg\nUpHD8Bfs9UlFGBBgtKqMIHgaCMl0cOPpusJQrAypomSm9VZR4AmU154i8Pa/\ny4KiF83deTYAQL7HGwt643F9qhZ1vuUr6QN/N+2UsY2Hz3c/vztD4UCCeDtT\n4GIw9nagiqB9VITnApK9vmSAtB8tfdpIJUaXCD4batWF7jvfSSimAsLYVxNH\n5qnp\r\n=ojVG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/6KKdxTF49zpXtypyRyZciW4njTX409O45dABgYil+AiEA/e2cJe/KGYiGNk3JbUdoizh37AkeIG5Cvam8rVPtaSw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-issue-215.20181113124134_1542113020431_0.0547046178691315"},"_hasShrinkwrap":false},"1.0.3-master.20181113124456":{"name":"@atomist/sdm-local","version":"1.0.3-master.20181113124456","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.3","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"c3000dd80457ed2a7dae2b616beee88f6cb0c30a","_id":"@atomist/sdm-local@1.0.3-master.20181113124456","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-vlINSKghvMn/ChRLHXTACBjf4kGCS5Ef9EcMA43AVvxvl7ApkytTPWmy1HUrPyI31y3nY/CnFFWtX+Oekz0e3Q==","shasum":"a4615b01942914b577545fc72935fbe992550214","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-master.20181113124456.tgz","fileCount":354,"unpackedSize":1293569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6seuCRA9TVsSAnZWagAAeVYP/2DkCE9AZ/RnNs7M2m8J\n5RJovJmRi+/Rhuf5p0MOGrFZni+iNegF03cPsoYwn8F5qJsnc/MQMYlHbtKr\nQlBCoYCQIUsX8Ub4cdfpBOpBxMopfKnPH2yfgjAr4BAV1dqAYl+YLpErzW/G\nWPwMX5Hw9/jFrU0EQsTGHalwXIjW+AA3gAHZMKpLbblu+vfUDle06VQwzmo7\nN734xZmeyLIrVyVCAtOWiThjFDw1eFaVEsL8TyoE9GHLy7nfasJvAxzugZdY\nks9YviUjnNcQum+vmtTWOE6p1HPsU88uAXLGGO7+hH1MNVg3dkQu233UTCBo\nHGXbovENJJoVZS/RUw3A51A2XysYmoK0soTdnNH35/4JY3Z09LDzcLopWa5s\nyx7YHdvQdeHUmryCYRnBgStI/giB9KCxklSQacDCCTalTQZmiZLwgPy/LmEc\nXLwrStr64NXdQi91Sbu8NPwud1YDORWq8NoUYpGXj5+SAYJoWj4yluPrIRDt\nmZZAT8zwqtVrxI/+CJWbH+Y57p4ttfUfuYPdz0YNEhCIOTdmRKs+Thv41GhK\nZKczti/TntuvwrasTzTGjkdbT4uwrl+YNajrUFkh6zQOUmATeR1c8vQf7+s+\nJGg9WDESAnzRZNTQyfEWtXX49qCS3DbNIYarR9FMpHeIB4JF280ysI5mzHzc\nfA8F\r\n=qZlU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICY1vhigTDrhgQBh3btxPMzzFzVR1PiORy3Lp0114ULFAiAqUtvT3r/SWpemRLqiAkkFI6NWP5tvZtMeuouLcn8Hsw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-master.20181113124456_1542113197575_0.5393412709329488"},"_hasShrinkwrap":false},"1.0.3-atomist-update-latest-1543307347107.20181127083112":{"name":"@atomist/sdm-local","version":"1.0.3-atomist-update-latest-1543307347107.20181127083112","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"cc8f8c0ba559bb11288868c164a2ffc262376787","_id":"@atomist/sdm-local@1.0.3-atomist-update-latest-1543307347107.20181127083112","_npmVersion":"6.4.1","_nodeVersion":"11.2.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-xcZtuOmxeG6UzcfoxZIEi/LFRhS/XDhwDE32ufIEMzeTRypymy33B83Hllo3tWlcFz9NKW/oLoo+TdgwXH1/gg==","shasum":"32d54af1d984b7fce5917a7e480e48db499c2b86","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-atomist-update-latest-1543307347107.20181127083112.tgz","fileCount":354,"unpackedSize":1293598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/QIuCRA9TVsSAnZWagAAwZcP/RbkvjS57QnWZDM3u60G\n9Q913oESS7q+FzHVrJFevggZji4o9k+dXQoGm2i4aGKGP+r/xlXjQ2bAcB2w\nl4vyEypEBAkJ8l5y54efn3TakgWH+EEcGw0tzShSWo7j8BNvyO/a+LzkiCi7\n+kjCxo/CAvr096JsuDAELXWXbnmLogjk+jYX/NwxyfBOFUK4jzdBy/JiHa9w\nu07l6bMNnOXDLiv25hufxUXlOW18G3zYZSPl1WL4hpZyRLGxpzZ8UJd9IVxR\nCkWDPyqBS6VKTdqaKt6oeNsxAlXVqBTgS31WN6650qomX8ngVyIWDek6nn3Q\nzMj+0gRSwVdW0TuJ1aQIjG3FJCbQhrCuUv0Fl85knperBCDpx4u+Qfon28B5\nWhvwxLkw/kd+guOzYvGhKwp0yQT+mKLbm6Huhn4OaW8JGlu0TJ5rQLdCyXe+\nwEY/6I7y+xKICwc3ChWZD6tFiKsAtBFNh5VtH18OPzn7tl+bMUXTJz6Z6V+6\ncurEAHxa7fZNsPFGgG/g1Row/osQRoi2BCBNE9R/wO4sFEVUdxM7jfcj5mIX\nLRqR1ts6StceoUt6LRUReQG8X1JtyM/L22u+PREPJFroAupP7O1SeLqNW10M\nvU0uMl0Mr4EIfbZWk8cEKbaxwOxaFlTYqCoEJ0dA2vsoPDw29Qk8WAHtTJDA\nfRPN\r\n=A9+N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfWQHHtwm/Zdg+PF/p+BGFpiFFOoCMuqkKJJO+f+jLSgIgcyS0WhThUSym3cgESHf5z0TENdsfrjb35KO5uMbXMiw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-atomist-update-latest-1543307347107.20181127083112_1543307821304_0.06657532407859357"},"_hasShrinkwrap":false},"1.0.3-master.20181127084442":{"name":"@atomist/sdm-local","version":"1.0.3-master.20181127084442","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"8b2d40759d8e6e1ebf33f1bcfbe0457626b69b8a","_id":"@atomist/sdm-local@1.0.3-master.20181127084442","_npmVersion":"6.4.1","_nodeVersion":"11.2.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8eOK9vW2FYdXaU8BhwTPIzEE34LVG8DnTynYDBqEc6xTOh8OkGtLb86K6q+ocUJQlsbUYFjCQxsRlZR2oRiVcQ==","shasum":"d3bd6a3a39cacd0a25db335efa49b6662264c769","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-master.20181127084442.tgz","fileCount":354,"unpackedSize":1293841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/QSUCRA9TVsSAnZWagAAZPIP/jCwq9IdugO1g3UKFN0B\nP3MiKbUiha0lP6KVULpJ0YOwdpQbCc7DR5Ov0b06VP656rfvKuGCaCbEzoMz\nSQGctPHdUKvkKSZrCJM5xeAa678GrBmR/fWd8dTP3O5dsNWV/lFEMqXSnC13\nMAeFc1TE1V/ccWuPNlERypLHBANnX0+DROZnv8i56LvqRCqaNOWuu4KyAGos\n8al8ZG8hBnPHIlv2YK6c8GKLLfYtJeuzKop3MZQxclJCyUhhxX7H8goVpBgW\nNvsg9AGwd0F+bXdn3aAL3YRBp0Qg+Gu5SINHLj2D26R8K5CFx85E5ZTHxw4C\na++QLFvC4U2itfQ5X0qEFFCWRS+R8AIRPM4XACe2HIg7EaWGupfUjuQlyALR\ncEQuQrlzzF7F+APA4aXbnQXLJVGj9NVtiexr/fMCFJX0633v/1ix+f1vmMkH\nyDw1KzkHGFrTYAcLiNnU/bOuZtB6XYs/i4Sh1/wfQMTFLswKPNQenU+ScME6\np1W8y+WGf3l006zvRonAIOx096S1PWUdvBaeCGKzlvVzSaQaf5LQUXfGd8tk\nw0C4zNy03h1vcfoUWvqLcmMAg8QMjpkSAxhqvQgG/CvOyjFGPGbJbqv/tS1t\nIqFgROYj7PKYTD+suZBr4AP7A9DPSKV24ZxhQyaB4mPO5NZP9p5UyGZXX5Z6\nnLFx\r\n=CPs7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAArb0miZ5OpH9Z3AKcHz2oLO31xSW9BntYezlGF78QAIgPlwSO4SwHjIG9+fWDODiCBWIPANcL72NsXqPQQ0CJU4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-master.20181127084442_1543308435351_0.5707669561061048"},"_hasShrinkwrap":false},"1.0.3-poll.20181203012517":{"name":"@atomist/sdm-local","version":"1.0.3-poll.20181203012517","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/async-polling":"0.0.3","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","async-polling":"^0.2.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"c27fdfb709a3ff2f32be0175da418ba879cf79d1","_id":"@atomist/sdm-local@1.0.3-poll.20181203012517","_npmVersion":"6.4.1","_nodeVersion":"11.2.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-3peW91vso/ZtwToj3HsVJfuu+XYB6LCykatSl2L5FOWmrx07SzInB3E/nb4K2ilzNh2gcmfcw3kVgIHj9ZkNug==","shasum":"4aa0c77835e52645c5e735d0b6176a815f5783f8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-poll.20181203012517.tgz","fileCount":366,"unpackedSize":1310892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBIZUCRA9TVsSAnZWagAA3uUP/Ry8AOtFbNvKIiAeMaji\n1GCaQoZB7dOzsrIOvJo2aP5mJAFQJlG45a+KNtUi3A6NIw6ipe4UNmbfDtXy\n+kHsVshf8arpmwDh3Ajs/fww7qRVYaR5lM2+AXiAF05SieVT/7LvpCfbIVwU\nuWtJxAZdrTtwJlGcZs6w0AvkNvudlHoj7OFsDwuIw2St81lWvnff3PJxhwfM\nokg/KD2uWy1wf4eKfGdNyxqkMYav84RysHG/5XnN/jw7FapFf03GD0VpiWgt\nYYjAtHHZWqrCl8oBNNQr77Tz3f2Q4n0NTuNRw2v6uQUG3khCeHtyeRkqRAd7\naIrETXyHDZsxPuh+8h+4rcF2XVkl73PMUswnpl/aJv3LAAbmJkJ/M1d+qD66\nf2PMZtLavuDmAEdiPcClQlHJG8NaJHBKf8fcXEXXMjTWTqTcwgPe5fJ41UvL\ntMkIyKURInXmO2zQzvbkxysS6yk5OQKNStq/PjC4cZciiliz7SVdDc5wdLmC\ngESJEgU6WxuFgjLWSdJEEnRx3qEsOOyYuEIdsdToghTvoMih/h9ORJ7n+jN+\nF69dbgwmuyDtLoGSne99vcwb/Ml6APRLq5RkHGvZSPgS2Eno6Te7TjPzRR2H\nSTKw+cs4oGhAMobHrr4vJDhusOVxjEwJarXhrmv/gmEMwxg3YkX2Ag67KWqD\nRmCE\r\n=SZPw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF9rHzWyS9bOLhKl57ZeEc6p2AXJ+lx6F+821LB5vud4AiB9xMcS6+PqlvzW5XMa7MkkLpR6NUjpNlUq0Q0sNKkyFg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-poll.20181203012517_1543800404007_0.0625105825324539"},"_hasShrinkwrap":false},"1.0.3-poll.20181203025207":{"name":"@atomist/sdm-local","version":"1.0.3-poll.20181203025207","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/async-polling":"0.0.3","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","async-polling":"^0.2.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"0e63c4b38c901563bd8979f43d7fbc7585c1bd4f","_id":"@atomist/sdm-local@1.0.3-poll.20181203025207","_npmVersion":"6.4.1","_nodeVersion":"11.2.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-q0iJ4hHBp+mOC8iXKjECLpfM3GXBIi+HeaHk+MknZJFscML84i4fh2jjlcaHhLarIvhP3qHT9NWhdtlAxgN12A==","shasum":"d9eea20560b44d127db01c6c99ad14785ca5411e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-poll.20181203025207.tgz","fileCount":369,"unpackedSize":1313561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBJqmCRA9TVsSAnZWagAAEl8P/3GFaShwwkPnxnFhdR18\nM1SV382EZfdTSTyDPb61KxS8jPqAuWrHuEAQeR5L2Tcb7kQD7u+LoX9a3x6z\nGHwW304vrCuLdjaUGBKpHrVHlbnDw0dK41rYZzKP5VeCUYnYl4576UxRyeFU\nK8weYVVq1X5EFCCK0IG6fpHDZGP0UFjUKc4OVqdnFNxvHZwIDiKXBY/KvWox\nwIzVD2yS40VEosZwAM71ewN57EOU5Qn/25VDRVzNTebwSgtFwR125RUvC4yU\nLXAYBfuNJ4bNedJ8LRquv6h2/4B5UvIgHTgKyNE9HtyP0NPOTkzzdynwK9do\niU2XUv8LQT46RJO5aKjvYcOpXRHIC3HD79CFJRV8NLZ+xsP+gvRJSjn4qzfx\nWA79lQNuRxIwoiAtEn9uWDyk8Kzfg8XpRV0IxJ5OLCOlZj2iGodYksAoePcd\nmAc19e7Etba6PUetasq6pnvpngQ3Sw9gHVGO43bB7Sn80LBIfLwHgyfHDz2k\ng//HHteaUfCZkkxziO11D/L6ARnTuZ+dbSOB/zrp5ojuBH3TVUYoUWOkwfYU\n5iJt5QVlKhywCmBqLCOKenR9ftJ2U/fuzMRkFjxnh8AZVdAAW3JB+VVmd750\nntcFWszM3q0ZVIal8qtai9gxG/tWTSvKY4CEcmrksJfNoB7cIiuSp1lB8EeZ\ndKfE\r\n=TKZh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyvBpGZuS/aKmA5cuV80h5Vken8GwK1dImPZ35Y1NBYQIgOxVxqUGbhonWQDJJCT3RYb70WjDSYVuDQc+7WD+UD1M="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-poll.20181203025207_1543805605951_0.2581569048271506"},"_hasShrinkwrap":false},"1.0.3-poll.20181203041143":{"name":"@atomist/sdm-local","version":"1.0.3-poll.20181203041143","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/async-polling":"0.0.3","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","async-polling":"^0.2.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"6bf571b5259caba98544c0c0348bf4c226f85a59","_id":"@atomist/sdm-local@1.0.3-poll.20181203041143","_npmVersion":"6.4.1","_nodeVersion":"11.2.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ST0mkYXAYZuQ+dcDGy4UTDqFM2f5dQQJpHbenJd+vt8d4pvs3FhRNhoCpmriqMRDUcdakKcQcwnTYlidmtaX8w==","shasum":"ff973d9349d050dbeb6c6cf5e44b272b92b1c9ff","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-poll.20181203041143.tgz","fileCount":369,"unpackedSize":1315665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBK1QCRA9TVsSAnZWagAAPnAP/Ry+DKMUIcOw2NC+/BiR\nrsuTxM2B53kPSITbwdUGl6qfXxOxg+g9wgX9Eu/UB2u9So3VRU+3jRq3qG5a\nrEigrthFCsAbJzpNwIwjoAOVCwQRVpoq9KWn6B3M0ntTiXv4+/fFUCjrvQEi\nXURf2KWd6+mlXyTcwcS8Mqkj4Zw161nCu7cuFbYnqM4rwWrZARI1PBkhGthv\ndhvImJ+KfABktTl3p6CeB8Kr3S+XS0zs8WjmkK/ilnezXXLui75+jx6J/Nxx\nNhz8xXEdRln7zyvFlwFQzsjJHxPahBmdGJuWibgLmBfVJD6dPBG2pI0f3wHl\nPwV7xKU2DIBVmkXKrjwa+ujxslrJnzK0vxSYWbi/73qaBBZZQ2ygXQyPd/E6\n9XoK/VaswvOQEV69f/cLB0CaKG3KduDCQ3M97h2uUhPasDFTeFeVkUzgiuPG\nb7fPFBe5W/2ibwPO6HamM2EFpXi97lQ3NMWtuX1L2bA3MQ1PR7PQq20vl3YZ\nVfV2s3efYb1jqyyiziiQZZMSKaErDCobFkLkaokpOWWaeT6l8hbfQJoi+H6s\ng/SyXPVXcVtY9nkw2ptXkE9wBN6wWpd/a13u08QZmwU5tTm+SqclhSFNESPR\nCtmTzNzWtNRLBJ80A4+YVuFmgkM91aFVADmOmGnTZeN2FNsYNIiZfJ+y8h24\nebRt\r\n=P4Sv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP2IKWpujcIXnUHVrcNZFm/J0YMT+UcXaNXPi7C01o/QIhAKzKn/MPBVP3lplQmD2rMjbc3pM9qQVr7Nh4KibOGBM+"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-poll.20181203041143_1543810383810_0.892791434538579"},"_hasShrinkwrap":false},"1.0.3-master.20181204014008":{"name":"@atomist/sdm-local","version":"1.0.3-master.20181204014008","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"8b2d40759d8e6e1ebf33f1bcfbe0457626b69b8a","_id":"@atomist/sdm-local@1.0.3-master.20181204014008","_npmVersion":"6.4.1","_nodeVersion":"11.2.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-PKy1THMoH+EPWQVMpGCrTe7brG3+ULGjJRjfy4pf+bXjMUzY5XCedVKsEFGrdF62VyQ/FrlII+01NGGJi+iCCQ==","shasum":"1b88c9c8d6742b9cd1ab4c1fbf549cd591410396","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-master.20181204014008.tgz","fileCount":354,"unpackedSize":1293841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBdtICRA9TVsSAnZWagAAtSoP/0e3Pw8nAp1HfqFbMyD7\nsL20BbsnC6TZbt40HiA6JIfd+NAiWu4O4XNdFipq0quRkJrjEnu3M+DQcIqS\niEH/HyQ6NoLmwRaFfYBMAVgwCsbjCrEjklMtNXlo0FxRJ5QzP5Dju+abVUEL\nYOhOL+MY9/xRebENB+i7ANLCwscqbRXpnZeuaTZGeOJK7Sd9+MeBBuQZEsMP\n90LcUb+82gGoAvKhiM2yDYEQNIiVE+P7jB3FvYXMdVbTDyl74oYmIobYr6dG\nEv7pe28HdceYDNUNU+LHyC3hnuBUYRCmwt/67lyeItqXcRWyM7PwPTe9Nv35\n26LlqJ5uqfRNorqQO/V8ZxujDoPsVeda2jsx57cF+unWAaPdWzoHyCjeK9mc\n5WSKZWSRtIsxg+ywRvz4Oj22gbyWaUNiHkYhNE8IGpIb6OyR5G8qohuNpcwd\nUbSANfyL6skzaLV/ZCjR9mqP+sWifA4K9Ug8eYaA0TAxAUIFokZs0qO/gK0V\noCZahxjSSAl8dCVB3OEhyiL4Lzr+j8Pu0GSxpdIKQ8llDMlcOs2BxiwShrju\nwPcL5Nu04W5ZJouQyvzbK7aaBXNQqe/EsVH96kxqg48BIUoJFE8cAaMGPTkf\nbU35qbMH/cbYYvRb6AMOu8g98x+MK8D7XZX2NooZoOamDPHsg4UMqDZbByf5\nTaTL\r\n=FykC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/vonEMDJAi49jzXRtm9eeLhBxIe7CDCODIkubLgzCPgIhANHZvtDeBDnFBRJVbOB+JhEdOOhSXWOVPpR8lF7l4xMk"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-master.20181204014008_1543887687191_0.5670986696204718"},"_hasShrinkwrap":false},"1.0.3-poll.20181204041549":{"name":"@atomist/sdm-local","version":"1.0.3-poll.20181204041549","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/async-polling":"0.0.3","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","async-polling":"^0.2.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"8ffd2bab7c29043e3349c3fc1ebce8f5236ad9b2","_id":"@atomist/sdm-local@1.0.3-poll.20181204041549","_npmVersion":"6.4.1","_nodeVersion":"11.2.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-h0wGUx7ruT9F2uoppQO0ljGnP2Qfd6KvLh7gDq4v/MALqEJ7SbRBCC5HEmvKYMByx+p6dtjjqBiA7A85k3aahg==","shasum":"ffddcfe13cf773e0e1514664dd4cbf4a9db8cfc8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-poll.20181204041549.tgz","fileCount":372,"unpackedSize":1320359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBf/ECRA9TVsSAnZWagAAnIgP/jQ6+zwzIAzpd4wE2Nfv\nU7QfsCHgsSceIHg3Zj5ZTVARYS6ojfWwrxkQgqdtnhRdAqzMFOiWcelMWoH2\neEFcwmTm5hzWGLxMPEBC7/qJD1ESOBfXgnU37mxpXeC8X+NvUlz1HJWdczJ5\nTJ1q8b57ul8oCPklt9kvlFCpC8j/B9oiLD0Cf9i23bzksdFLjTRWAGSd79SJ\nxPn4oNgOe1fiKEzy1PP6MbqDOOs7sVxMEaXCS43avnB3Pv8hDIA3MJOozwhx\nXHZnAz4XmtQJzC0Ld4rTNS3fULtRTVi02R29VLEr63JuuSkWirIoRbmsnag7\n4d6HnUCWaat15hEli/Uug3d3Hva5qWCwk1g9A6cMmuizwLHAmiXFj6ca5SbW\n1665yMnlPkw0pHGlU1oTOxjmgx827UjNMc57M0Or1ASrDvbS8r2gDzPnS3Ec\neonsxqRGcXSUvzFAOI9Tqn9sBHZNh4wYwFRtmMoHmnxfcbObYC0ybZ7O6Bjj\nlu/v5zJu1HTxzAcNJRhyHYW6sbH4p4OVcuB4OvEJz6nRl3/gvgWgSpt7oFP1\nGw32xh1Dr5MX2vW1h4mVw03CNbKXaPZN0V1ykhx1DXbw5DzwsZN05HvrLjZx\njTKTSPsd4yZzLUBx8cUm7XHwxGEbGd64QvvYmZJ/0FTQo1TTw0qSvdseovdW\nJzgD\r\n=cE9N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB4jAcX6Z9d1JnFj3HkVBAMsrX/679mZouo7SpPezaV5AiBFDEnm2Rec8XhVUOiw2Q1p6XL2TUp1LNKo0Aoq8SnoLw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-poll.20181204041549_1543897027130_0.5005697141031984"},"_hasShrinkwrap":false},"1.0.3-poll.20181204043107":{"name":"@atomist/sdm-local","version":"1.0.3-poll.20181204043107","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/async-polling":"0.0.3","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","async-polling":"^0.2.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"1d88aa1dc84e79cede462ef057f9a065d86b8e86","_id":"@atomist/sdm-local@1.0.3-poll.20181204043107","_npmVersion":"6.4.1","_nodeVersion":"11.2.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-0qZZxNjMvW1+pZ5VNg0yqg9ZfZcSpmD6M/23PgLQD4vQU4WJJ583fT77q6SoZ5aKmHlxJdgV9Ahv6mu7SmPhkg==","shasum":"f5c09b4711f0e32f115e389ccfa5759cf728bcbf","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-poll.20181204043107.tgz","fileCount":372,"unpackedSize":1320541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBgNVCRA9TVsSAnZWagAACkEQAJ11DkyQpvQbkndrDuGU\n6wirFsq2pRFnoBIOxPJNoMJct8rcfBJj/0THYv+TjEj1muVSoSINDmYIIe4e\nx3H+kEncDCkCTtxhsvRz4czTor8UW43I0ntnE30evjrgfHLFI6UjF5lBngE8\nA556hM4+IxwxvvtJEruF8rcO6BSiEmbt8Ni0BtNkahNntnQ0ys9BNbXxrQc9\n/bUzd+XCeOeveuDs0VIITLr1o5fhqaUk8wkP9AEWS+f9sjzIlsfffIcAMy5O\nLmUkOcGngAvWK7iNlg+o7tI257kL+IC23vkC+a2m7S0V4Fl0mhJWLqYBVyej\npb3iHKssRbAQwhPfEAwu/DBytdmdxRLfHSxeEewiXsqKKswPakiZ7YwuOHXb\nMfH9cf2xki/2jR8clQh9d7bR/p139Ztbos7UJ4yLg8qOtJFA+SWm93sj2hNA\ngw3lLKnTbPKYlGpQeV/DTy4FCjCmMI/uYgGREAsnqAAg0Ftz+1LFDcVHW6vr\nvcP9/wP9oA4LON44+RM73p4Ld3UKdj8pePhdNcf8Sq1cXeK1Z8LmQR8qphb4\n885pirOzl5CZzxu5ubrng5N5swiiaVTwEdmCv1O+JI5R5nilTkm5t7sZXIUO\nJI45+h0tLabTalj56T33HzdJkySnto6zY78qQLrTzgOFJ7hkqni9Kx2pj3v7\ncmka\r\n=6EUx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA7WVlHu1XjKZ8Umrl6P5KRMQSR/2aljr1K7SHCFRLfgIgGELfLSmDmL06ce6IV0Sc2n2do1i0rjniS1Lc00rPH0Y="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-poll.20181204043107_1543897940562_0.37389767198615753"},"_hasShrinkwrap":false},"1.0.3-poll.20181205022533":{"name":"@atomist/sdm-local","version":"1.0.3-poll.20181205022533","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/async-polling":"0.0.3","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","async-polling":"^0.2.1","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"eff2b99de860d34079ac383399cf2f4f10671a01","_id":"@atomist/sdm-local@1.0.3-poll.20181205022533","_npmVersion":"6.4.1","_nodeVersion":"11.3.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-I4dZE05qjcjHOef2LE8OUpdGZF70MMoKD6CE49IaGa63c5oPF+JxH+IFhtkVrk4HwLWDBUF6f3kxJM3kpt/DMQ==","shasum":"e5035a5a50ea6cfffea820cfbaff0d31ef130ada","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-poll.20181205022533.tgz","fileCount":372,"unpackedSize":1320585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBzd0CRA9TVsSAnZWagAAn34P/0NoTygN6NQ+IZwkaonf\n1tqROVftV2ReFYEWseiLreaw3oUz9TRsOa952Dy9bT76s5bzeE+aaiMnaLgK\nw40gOomyJA2McJBVCCUYe26xQqTRGb2SkOlqeH1kD4yvpia3YXTltnkQ9TTj\n/vjnuudopt5WGId9FMBexeR/QXF1ueNCobF17CKAPB+4mZaGg88hdYlV1CT2\nGxhiqFA6BVAnvL3KQpcs+NNJtWE2CA2UOA6URGKGaMrDNmZU1fi9s7DF2Lwe\nM/Y2XdZaCWfEwAkNqFs1GSaGBJ1A/VB3vL7puj45+QnFT4dVTTiFCBsXRJpP\nD/Q0lO0Fjxc6rsMgYvQ8glbEmceenvW2l164FIeqYevJPmra0GoDOrYM+fBV\nNxMgfH9bYLuxVaEeYRTj3YvAft/3hGeuMcNkTijr9ECREdosemMmKBxy059r\n/tmK5a+scYHMl+gaDslCnoINMf1R49byWkF9V+8RPV6SG73OjY6NMcZB1+ey\nv97F/xfuxS25a4PHbWQUGgVPul3+zVQoZapaV2gTdUobUmsB0qgZQgnaQAFB\new7NniZ1ZKHA3Gj6WHG68LawnQEO00+NXB2+Htq/zbKoPqoCxeKbdJkHY/hX\n9RLlTO/rx638hH4AoLIRidAvXdWOCRW8lc2Tqih3IOZzckEPlMA8hWulMlUI\n42qx\r\n=bzeg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEC8QeAiF/b6Xj7GAg02LXvqkDTZ628AGP/IB8RSNpTDAiEA/ooNkunBC4B08Hxok8/TzAC+Sr1CLeWq6lHQpPdJThk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-poll.20181205022533_1543976819180_0.7181629762757333"},"_hasShrinkwrap":false},"1.0.3-master.20181208213559":{"name":"@atomist/sdm-local","version":"1.0.3-master.20181208213559","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"00000a61ee0179fbfab9a1cd9232228ff328ac40","_id":"@atomist/sdm-local@1.0.3-master.20181208213559","_npmVersion":"6.4.1","_nodeVersion":"11.3.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+5JuZ4A6wdJheUKhnVMIqxjKHjW44+onRS0YNbEjaWg5W+hbaNF/uI1UeNWUK0sxmN3K1JkypTqw+55sH6DBpQ==","shasum":"94fce88f2d169bf57e9a57472d1660919cebdd30","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-master.20181208213559.tgz","fileCount":354,"unpackedSize":1294193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDDmSCRA9TVsSAnZWagAAftMP/3wY/V9trwaBpHVf3tt1\ndRnaTV9U7vNn1kUVkq9y4MMaZjFFwIDJkmiEUqRWZgFDxJn1Taksc/iZeCDS\nsIGKspCi4M6EpJWITUmTgsejnDh+wWVlGT0r4u2SAvfjWJyPAypJerCZQ0Jf\nM/wd5pV5VzCqR/owdFbO20fRqeeFOloFwpiLdGBXVS+wHtBLZOyl+T1KY9vc\nf5nTiFdD354Ik2JJ6YMuiW5P+u52nZcM+Ma3nAQzlLarQEivOWLMZyiTEUs3\nex7u8PVry7cuErtJwJx5lprjrgrHyBCE9D+B7JzPLj5xzsYuBpFLrvbYGpt8\noQ+qhGJFM1qv6/o8LDuDaIvKSZoW6QRPq07rAmz7OST9BH+3q/b9mzFo3QhV\nDx4VI4XmEWLOw0hYH/dd+Ett+nzdkst+sPG3/LIx6VQSiQ3zvW5Fe10ng+Xh\nTO7r32lcmpvjCVNrUBidHZdHfLw6Uhow/F+JIm1dikPc9o6x4A3v8Zt+OLae\nN8SIg56rE2bL+TzE0Uc/Ign5MqbI0GEsW2QPm58NkijD8mHKpdExDJMH7iqM\nQGnBdL2H61wJZoFbFoNp/RrixH3SLWGCOkqmoUdapIZbFmyizYqCyEt+hlZM\ngu+XLFVgSclArWZGZxskmuZBhIBnLnXHfIEcLYVd6JfxU70LPsDr+vGYTJO1\nUBK8\r\n=C63Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzh0LFWDgi/1xtauoBhuBLmSfKbFfr6gB6ZRdNrMBMDQIgWXPdSoHQ3FvjifXo7kKxxdlJ8krgQ44hkY2bnoYZurU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-master.20181208213559_1544305041434_0.8427473076782048"},"_hasShrinkwrap":false},"1.0.3-master.20181208215507":{"name":"@atomist/sdm-local","version":"1.0.3-master.20181208215507","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"224f9d6edae0ef32735b9e8eb8ec9321e9322797","_id":"@atomist/sdm-local@1.0.3-master.20181208215507","_npmVersion":"6.4.1","_nodeVersion":"11.3.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-05tg0cNvSSGXDBjqUrSBQc3IAFRYV4lWXw2hDzUfIcXqM/+5EZpJFvJQYFXoo2gHpx1Q866zo9/nBEhGEeO8sQ==","shasum":"df4f2940659b12871b8113a8fd45392773dc688f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-master.20181208215507.tgz","fileCount":354,"unpackedSize":1294792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDD4pCRA9TVsSAnZWagAA2FEP/1wvgWRU/1RQEXOZI7Hk\nRB3HxQIHdV8BQ2kUIcs2pSPe+Ahx7mWSUlrxsppSSwWo/Ox8tE0KI1DLERIR\nJ3ia0wFSoB3jgCG9T2J8mnu4WNgGUxsfJOQL5bURlfqUZDxwHPW9bi524zBn\njneIvqcqrGXGNc+wA8DJRlop3iUN+wR+degnpX8ePxk80JwahHPdbF+3yY3U\nJ0/Afj2iVECdrCa/4xiCoa8IeaNBX0gkWaGLhve9bz/nrby3yWZtfcdmw+0h\nY6hmM6Do4hNYGo7t0QV8cs1z8PMcnjQfSg41ifbzEq+2Qh6xCji7b5GcJZjO\nmzigqlRJUAbP6D+GKPs6d3GFrxDc2lLYFPUdppkcQEsixbIngrIL1FTXGgRh\n5wo0WZif1A75RfAd50KYvj9jeEqCRrV/62KYURy5rjDSuHs8Vp2cbRU6Qewf\nXgj9lCdukBN2KngqCyq0PupqC86aCaWcerFE0+7q76+O3D6wxuzTrlgotr0b\nhUdyZOI2/WdCRMuCe77b3wWauX2fWZzNt/S/fsWrJukA3jzTCpw6Ja3BAYGY\nCQ3iaFoxAuSRRjM/NJ0Bi/8/g4tnp9ThHbYbLVJ2Q02nQamCUekq7aj19+yo\nPn2og+8D4zB1tGdcytDBXEqZDr85BHaAgF93J5q+FKie81M1RLVocjL71TKt\nPSuG\r\n=VLLY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEv38BRGjvkQLlXCNgiDFocxn8x4TfgNcnfx4wWKeQ7fAiEAiXueQJY2tEkmIgr5aihDLy9pucZ/rk+WuKKQZdK1DMY="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-master.20181208215507_1544306217324_0.17893940987496748"},"_hasShrinkwrap":false},"1.0.3-master.20181208215547":{"name":"@atomist/sdm-local","version":"1.0.3-master.20181208215547","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.0.1","@atomist/sdm":">=1.0.1","@atomist/sdm-core":">=1.0.1","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.0.1","@atomist/sdm":"^1.0.1","@atomist/sdm-core":"^1.0.1","@atomist/slack-messages":"^1.0.1","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"224f9d6edae0ef32735b9e8eb8ec9321e9322797","_id":"@atomist/sdm-local@1.0.3-master.20181208215547","_npmVersion":"6.4.1","_nodeVersion":"11.3.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-kPk7nsu+f+xmfCTFUAkUhIRz9BHfkKzMbsM3UlihUkUQgQTZgpCOTcTPg2ss8TkJdCKlR3iWy7JE+xbSNehdBA==","shasum":"3be544c53106a3187238d06291d587dae9cea9f2","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-master.20181208215547.tgz","fileCount":354,"unpackedSize":1294792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDD5QCRA9TVsSAnZWagAA+/cP/0etDOz2CEctPzZn9/U7\n8k+1E50LowbJOZunWmheTEUbhO/8v2nXY4lyUkXnuExOedLt3uvD338X/LZf\n8GG0VR80H7IVAgQUOEGzsIvvc2QVfYU6VZZNfmnmny6275VM9qqMyraISrDW\naRaca+28392zsj6VwhWRcNHqOrHfZW4p4+o7L8uQHVbXhndDyBpZgUNpzD64\nd3XKEZL63KB2CqMSkw4XxgBHpqgzAWYwQ8JiYluf8rO5W8D3suwZaHHJ5zYa\nOpfZhwHt0c+FrKXqMUancIs4mb/Mz/+Px5ECVSx+x+oI/M8gdkVnewdxL6kz\nBubWi94SxzknX2W6PjpQXd8/9RP2nFn4xE+xhCVfAZZ0zSiMXUXU5eaWDcxd\nUX+OU3grws7juULf6Mvd5EyuzLrNcZn0e2YUl/xjWDvsGy+kxNBuI/hqI5E1\ntZgP/rtlmxrvszY+66SHTCq6TzZK+Waylg6ns6oq/t9FIKCf7qcCMYDysQ6w\nTJSm7NidqSC96hynmtm1eu7Kn2qtYcB73OfDcN5Nm5+BXRvXE7HuDC90ThYR\n16yiiLwX5rk9C3wkNVuU/kqsDbHqMOJLbEy5leMp01cbT7zitSOjMUmm5eze\nIs9pwsVbeYfQ1Fige5tTp5HKA6QYNlsLY7UIt48L57tcphA6B3gfwPuZbSDl\nfOFQ\r\n=Hb9x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAv0GhEox3dyHdz3UHjM0HN0EayPmSE01y3rFHI5L1+dAiBd6qX6vPbdnnzPRs92xK3BzGYISJ0nHWK17EHXOqkOqA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-master.20181208215547_1544306255584_0.9971210585670065"},"_hasShrinkwrap":false},"1.0.3-master.20181208223747":{"name":"@atomist/sdm-local","version":"1.0.3-master.20181208223747","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.1.0","@atomist/sdm":">=1.1.0","@atomist/sdm-core":">=1.1.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.1.0","@atomist/sdm":"^1.1.0","@atomist/sdm-core":"^1.1.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://github.com/atomist/sdm/raw/master/docs/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"c8a43f5c34de6ba6e96f11370482812fec3adff4","_id":"@atomist/sdm-local@1.0.3-master.20181208223747","_npmVersion":"6.4.1","_nodeVersion":"11.3.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-LWEURxK2nTk/ZDertqhLA7RK8vYOjN6q6kpEwY2HlsCQvSHZomtgiSUZCuPiLCyEojA2LqkEnTmy96e0PURWpg==","shasum":"b06ac33fcb1c23cc2fcc4848659b7811bb4ccf3c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3-master.20181208223747.tgz","fileCount":354,"unpackedSize":1321461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDEgQCRA9TVsSAnZWagAApBYP/i655i9OeWz/l7NrPfTH\nAugXiAgyFV3CLUeGIcX9OLaa/XdW2H0zVZHEsMzMQBWuyMI0fwPnFtB87AZB\nhVBzS7EU8GCQrwShvMQCJVMJNh3nmc9LT0AaCUuvq3o4nfrMSKgyTvG7+ptt\n75q8P0A+CuM5pRcHiBNyfNgIUimD3CtjHBHNejeZpwJbkIC995yAAqfkkwZl\nLbTQA5lLuc+domoKwXsh5iFpfTZ5QcnIblFkw9bLw0ooZM0fjazk4kVEzs+t\njg2Z2ntPWmyupvD+cwT+ZbwjLqoTHMT1PhcSoxJyuaj9ubV1Npzan4gtS/y3\nFVsnfRxW2rouxwdZmHYfdyYNYkyB338u6f+ae3KsAMGiMygBsU3IV0Z1k+sd\nME11+n+bmsA2CkleYC+qazj+1PyLdnGYhkwCQRpHCFuZ/EE5cba3Fnz5MnAP\nh+6z7BRmlmw4XvGHBBofTi+VMiyL8HUZL+OG+B90Ih8NYbkPv2fIdToBElG8\niAtdVBlHwjG9aUGYUC9CiZ10+KZaBVbGHv5ajA7GTgvY3a+dFxNY+p++9NKi\ngu/XTUrKlL0LBvh0rVHqbOZNyz5xXcTvfvVrLsTuK/bXePU6wXwlQC0wQZuG\nbL0aiIGZVqP8uXt0b+m3mEpxjrM4Y7mRjDCdDf4g/Uwom2ePH7PPcr3+E6J4\nd7Ij\r\n=3jDG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt4oNbb2UIcNjzQUlIzhelAFpuywYQcOckGz89it/DswIhAJECQBsWR1XUBlFh2XtvVSYtfHuj3Q96Hi8+N0LcdsWm"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3-master.20181208223747_1544308751816_0.8084063606675671"},"_hasShrinkwrap":false},"1.0.3":{"name":"@atomist/sdm-local","version":"1.0.3","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.1.0","@atomist/sdm":">=1.1.0","@atomist/sdm-core":">=1.1.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.1.0","@atomist/sdm":"^1.1.0","@atomist/sdm-core":"^1.1.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"28502102377d4659c0ced0764abee938d9687263","_id":"@atomist/sdm-local@1.0.3","_npmVersion":"6.4.1","_nodeVersion":"11.3.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-+ovrJ3RHpgmyqkvsLenoE2SKdkDm/uXnoE+fzNbeIZtpg46MC5I0YuZm694KJ30evqlIQuQpOQnrEfRG04Cfjg==","shasum":"6f0e4a2aba7b81fe3c0ef5aa91b04a02fa489416","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.3.tgz","fileCount":354,"unpackedSize":1321439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDEheCRA9TVsSAnZWagAA+nkP/jEenlydT4Nzl8NWR6lR\nmPoJxV0leTyQpN8daI3q+cu+V4SgONh4p4Nw4wsuc/77qlJO58JpxEiMDDF/\nKcNRcNHKSyjxRuo05tUwXFJkbnDJPyouOMYFIssTvDPs1us5O1Q+F3/4F4/U\nWQJmDkvuLYUT2f6td+W3jrQMymHVcvwB7HyVLNqNwAs7tkE0sk+DTLc+bwhI\nm9VCFWaK9YCtVtDh26eUAEFBZiHZJFgmJURW6KBi/vsh0tLoe5pNHKdSRk4X\neme/mSkxmCqus+fuwm5OZaMiJ+XlSBuxalUkrkQE/H6tAYpB87DbySVnA1Bm\nJZH83a5yFJ1NytQRWYUmUhJgQ52Gt1mtyv9va5sPRk6XmBJM7bpVbyhtSdB6\nEJy/YjWSS62steN3Y/CbY2IYR/0nMeJO9GEKjA0rlstec0zQSWSGjuO/xLgE\nXj9iSzU0pJvu9mE3oDnhyByMYv0oP0+9xwwAAJSf2RRMOkX9dd3ZYxpQ9n11\nXonnHLcr3kHIZ6lD4eiZ1zXp110mUDbbRB0n6NUv/lL3Lfp3rc2PKS3wSIdT\n2dOLeumbR5PwGR61GEUWireGAfqnwwJJnXwxtl3jPmwUH8lSkCWKWGCBa26R\nEe6PMPZ1W256Z/vz6IZVnnWwrdsF+wndnh6MxSiKGq0YJLLf0rsQLKxFLAnA\nsDP6\r\n=jUqP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2kNZ2uwVYixdh5tTvVacl8LJWNeUefKgCnf3Xof9ptAiBd2vrF2kPqSNUdLJf3zI2Yb05HHaRKL5f4rUS/cjzQdg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.3_1544308829271_0.26917429947832483"},"_hasShrinkwrap":false},"1.0.4-master.20181211132012":{"name":"@atomist/sdm-local","version":"1.0.4-master.20181211132012","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.1.0","@atomist/sdm":">=1.1.0","@atomist/sdm-core":">=1.1.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.1.0","@atomist/sdm":"^1.1.0","@atomist/sdm-core":"^1.1.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"1c797a770ba94a15e111251cb043d565d347fff5","_id":"@atomist/sdm-local@1.0.4-master.20181211132012","_npmVersion":"6.4.1","_nodeVersion":"11.3.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-E20ujfdjVwQQL7tm0N+FM04L4p91+rhz1RUNHPDUGhSYtJegLsRlU0JKzDvLDcdOiLq0lvF5So15701g4fKRow==","shasum":"bc57e6eb478b297c25dd58cd375fd25a7a21b8f3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.4-master.20181211132012.tgz","fileCount":354,"unpackedSize":1321704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD7nsCRA9TVsSAnZWagAAOeUP/3g1wIVdw1dagDeSe0Pv\nIZwyHopss8N2xA7g1vxCR1hug29L7pvjGBRwF5XvS2HmFn9b5QLilBFHOz/3\niqmMbAsu2RGu5lnKvcnb2VsAil+hu/QteJe+XB445c9+TTBBz0NqiYLvE80J\nEJ0r14E4zhUb8ae8D6EoZj5qtiTf5Vv9v28GiBupwSMJJexL1Rwrow362fbn\nYUh5hbo10qbcUF0sDw41beK7kBkEnu1YsqU7zaW845IRHyjXtxZ1c8h4Iztn\nGeIvKQZ9aINnYQDw7cmSqh2P1pbFyxeLD9zDGfXoxN5K98r5PLZHMNiNDfr7\nuCM1GFdyvdHvUvWQIgRYU8J383C9sVZxKvASUOL8hFP6JhxBQ8iQ3WdTFsSH\nmWpNNssrvXSVD8v9Mc4seJ9D2CvePZ67uqAZ7IWuz51A6aQNAz4bVHs8bpoR\ndxt0zMY3z0m4JgGds+NbC/LlX8ZAFDNqO1tG4Mk0fwOwEMp2k55I5YkD7VOa\nBciv92Cf0cY4gSwnTR23GTMDihmwZZq0rtgpBLSLAHSExMczXZodEr1AJy/P\nJaDIkLEbQECFnxNnzMZY9xJiXnNRvL/l7vL/u5XbrMKgfNDp3Poq2RT8tJ9R\nQQw+5OZOBHir477H1aC3N7UJX8P9YYjXmO7R6btKeL/JQwn0t2B367M0tFgN\nSr8Y\r\n=H3X7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4DjgTEwXR3EOHWR1HTRDwXtJMeiW/5Dn0Dhg22KVGBQIhANqSbnpFxavzNevccd3VTq1PhDwvEYVLxysLUn44AXdx"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.4-master.20181211132012_1544534507515_0.1932288788079488"},"_hasShrinkwrap":false},"1.0.4-fix-k8-descriptor-transform.20181221142658":{"name":"@atomist/sdm-local","version":"1.0.4-fix-k8-descriptor-transform.20181221142658","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"0.0.29","@types/lodash":"^4.14.118","@types/marked":"^0.4.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.1","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.0.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.1","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.1.0","@atomist/sdm":">=1.1.0","@atomist/sdm-core":">=1.1.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.1.0","@atomist/sdm":"^1.1.0","@atomist/sdm-core":"^1.1.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.11.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"7426ff83cdeecbe6373336ab0039a3d7f9575e10","_id":"@atomist/sdm-local@1.0.4-fix-k8-descriptor-transform.20181221142658","_npmVersion":"6.4.1","_nodeVersion":"11.5.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-nyGMNkuEpCE/ZeWhGqdRNk+htQQVPhWsZY6nFU5oKOu8rHXFttmrsXwrGWcub/h83kXg33wvFf8iddA8qkbVVA==","shasum":"672e8a3274b10b6c125d0f957e962339fceb583c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.4-fix-k8-descriptor-transform.20181221142658.tgz","fileCount":357,"unpackedSize":1325956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcHPiBCRA9TVsSAnZWagAAi9kP/0duUXUQGFbe8neuEA/Q\nqRHSY5WwBGQUe8YgHBzgfqpkiplfdqZG7mUtySltoqSCERM9ID293SXgIYfm\njW85qHy8v+1GHhkQcpFvGeBscUVckgQAElUQNyPsSo6z0mIdDO97ZIxfLM4D\nGkiYqFCIihru6jUej33OjwANcfplhU0hT5lq4fLiewv3aow/6bN7ng7A8RqY\n0c2Ztw3B8TQsiUPCDXsHuqNkr2I5+dYyBZ1aG8GWIOYYllOU+jNYtLnNO1xC\nVms9dpRbqdwxI9GrQxyU0mfWz+h0NHaQ9qrcMrp4QXaGBn1EgnaLAbPevkrk\ngjLCYogtNbBVZLoBbFvdiYr0NmvZuG9rrXqHxZgbeHEBJs4Slp7O+jjdoPaw\nOI38kX4ZpBiIQdo2uaaRPeqiD//nv4WcY1+ikufpOwG1e/fuNLRLa947nKag\nyGE4dRCd5CgETSY63JkklkoAVkqA5ClSiUqOL/ORdoTdAbaruQ2m2JLZaE9g\nRqWEvio0sj3De8JfilRiNEBtlIWBHySq9iO18Pj1hjrZufVFpDfxCjsP8DOK\nNpsuVINchPIGmoKzLP68CgkVTJpuhStYTBzTWT6Y8BeDw/6GvI580NE82y0C\nK6STAnxe7Ju6umtNA9CSAVT9P7Ce5VB6ajTTVEJ2CIZjLHPgU/dDSY5fd+m1\nYHvJ\r\n=KRnW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC//I+VKVMXL8PcXyH3mXuUqlDO9YztIZktn4qyP2UESwIhAIJQ39b96c6Zg6gKa7kY0bf8bBdwTuedUiyBUm/1tATq"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.4-fix-k8-descriptor-transform.20181221142658_1545402496403_0.3395542265709637"},"_hasShrinkwrap":false},"1.0.4-master.20181227082018":{"name":"@atomist/sdm-local","version":"1.0.4-master.20181227082018","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.1.0","@atomist/sdm":">=1.1.0","@atomist/sdm-core":">=1.1.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.1.0","@atomist/sdm":"^1.1.0","@atomist/sdm-core":"^1.1.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"14cd1d2c64775eebf1124d1abf14c450ba6313a7","_id":"@atomist/sdm-local@1.0.4-master.20181227082018","_npmVersion":"6.4.1","_nodeVersion":"11.4.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-LqvK0gxI623Vm7ARi0UNGqpJkQNSKpxlnvYujbLQSrVl63wSWPofO6c7/d6tpCSgWjMN6q+KztCFhgCsCymCrg==","shasum":"789ad52175a6867db7304371bdafe41898cf2974","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.4-master.20181227082018.tgz","fileCount":354,"unpackedSize":1322196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJIuXCRA9TVsSAnZWagAAkoAQAJ+HYDg3I78hzTIquRc2\npUrcijtBJjpaXFbGSHDpsqUMNoqrxiVj4Z3k/Bn3YxLR5SuGYRqMvaXfuztW\np6jgtL1/+9hx5gMUPYq1lcgHr8nx364+5Dysbl/fmZHGGpcB2pu3zLDbxbAG\nEzX0ayHjrKm02zmeJfyMqq4RBO6rh1n7+PIRzj+Ql/zNlvenyYGoJigeklwK\nmTGoiKJRolrdd/cPlU/hFBTlc29fTUj61dhH1LJej5EdwW9f5O/l0BGF0FpI\nHX7ryHoO3SCtYxDr++JqsqC55wd2t4tldEelwsKsmX6S/i6F7VgQdrN9bznw\nkHKAP0NWjHKipD0wtkfX6Im8Ci/miEb3Czs7NGfGfvFLQuNLQT9Or5ZBAtWB\nufFor/gj3Nad+Q76SKchCTAJsbXtwnsHoKzutuvOqTfkJNXIhQuCvO7nNiGh\nIgdweIvc9onJB5jcuqRGlAyKyf1ToLcrRyPA0vWfP0OdmsCBulVOn/IRY+cH\n91oFKUXB1uuFkXK921dTcnHvIKBdDLIA2vNZyNQgcR4MvUfyfdsZnuNbvFwj\nqlWvB2Db+lq6gHsz1VBTyfrq5uJEbYmHZTAijcX1LiL43U2Wcav47tODHk0N\nM/DrLe4DzeaJ/3pqfchPKZLavI7RgEwARuRvMQun3RNZIW2u7HDFy0zmyR9D\ndj8l\r\n=J3yl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCZBbKYUhbfW+KJHLLPdt21A/b9t8RL25M/cNLUNzaqQIhAPkRLJAsXrNhI5yhUvm9qGo/cG7so5Qp2wSVb32Q2S4n"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.4-master.20181227082018_1545898902844_0.03309057232709178"},"_hasShrinkwrap":false},"1.0.4-master.20181227120723":{"name":"@atomist/sdm-local","version":"1.0.4-master.20181227120723","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.37","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.1.0","@atomist/sdm":">=1.1.0","@atomist/sdm-core":">=1.1.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.1.0","@atomist/sdm":"^1.1.0","@atomist/sdm-core":"^1.1.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.1.6"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"47c108f02a4271119e92efdefece593abe86142e","_id":"@atomist/sdm-local@1.0.4-master.20181227120723","_npmVersion":"6.4.1","_nodeVersion":"11.4.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Z4fdgsmgMDfD7RRC0IU6E2r4Tv2+jDhQbmDSWl4M6qHL+dxEIsWEDrC7J1nXcpyqStAjq1HYXQqjimNOM+SJUA==","shasum":"fae55321751c047bcc8b19794fc3fd1d44722e93","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.4-master.20181227120723.tgz","fileCount":354,"unpackedSize":1322197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJMDNCRA9TVsSAnZWagAAZggP/iqnd+UybEOtc6dSGsQF\nXfzHzZTEA2nb6vp9QraZ9fuONOpwf5B7QadsJduOU5K3eZF5oHvvsmKFKE0l\n7UKZP9P+USOasmXVDM9x5yqsNF5BcqsUQ3FVTRSYeGGZZLxk/aak5AU7kOGN\nO6RVrQlnS1nbsRhqFNhrkW5fYsqlWtcRTl5xAEPxllrvaXfepQXJfwNROCeD\nHwWZrjVxl/REFBJfe79jhC9p60Ymy/BZ1r+09TD/JEqAZmyO74kxBbGUKvH5\n6uf79KC9DYnTe1m0emU8JanM8WRZpJROxXwoaV846wZbkjTnrwN/8vS6Vy0q\n1pq27lqyrMVnGt0Z3wSg6EO4D//mDp56+L2kE9mdIV2lgKHQwJEBiL6DX8vW\nrUDQiin//MPU8lbyNSL+wazi0wu3QAC2OLVYyoaJXuvsuNjoUmwpAg2csHKV\n2kDE0d46caGhmvXyk3ksQvNjfzfBmgvXmTscmg5gYaxqYHMENrza8lPmeEqV\nf2TWgC/YmmUIUUppWRIpP2ja+eLXWSxRQvfWn7XeGAwsjBoCc09luj3W9QMV\n7YGl+dt+NYF6o85MI2z/PXbyvZ5YlPXFQy6qjwWhQ3VpNPX+K73DMtmJVGip\nR+J/gKJ9t7fPsN1YCgBwIrmxArflzeQCJfistSyPNfy7miWWHj7WifmGaJjJ\nj3vu\r\n=5EHl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOcqgCsIuQ/04YGUYDztbKkoA821v/7bG8iTOki9saUAIgMqPx4mPDYJYNb6o+7oBA4BfdPzjvqa/H2YewWBg25T8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.4-master.20181227120723_1545912524282_0.8892750733665604"},"_hasShrinkwrap":false},"1.0.4-master.20181227215519":{"name":"@atomist/sdm-local","version":"1.0.4-master.20181227215519","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.2.0","@atomist/sdm":">=1.2.0","@atomist/sdm-core":">=1.2.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.2.0-master.20181227212650","@atomist/sdm":"1.2.0-master.20181227213905","@atomist/sdm-core":"1.2.0-master.20181227214925","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"4054d5c3f13410b312915f849909a8477e37b8d6","_id":"@atomist/sdm-local@1.0.4-master.20181227215519","_npmVersion":"6.4.1","_nodeVersion":"11.4.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-49N73HGQLOhi6lGJnr1s/LBAZ3PkvcWTo3q29GP6hpHN2neFTYKFuh3xly6/nEYLewe6gaIh8piWP4niPn5EWQ==","shasum":"282debbe4736990de78cf440a2b939f58b35f40c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.4-master.20181227215519.tgz","fileCount":354,"unpackedSize":1323294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJUqbCRA9TVsSAnZWagAAmS4P/3MbqpV4zbEtC+7poqT0\nEx5s5ALKvLSVJdZbQBDGTU7zWLL0/36uDe0cNto8u2C/TxKrgFlVhgquG94P\nNamjeJAqe+9H1rDrm96UgVuawHdB9e5X2cHhKgRCGcA5QH93sHKgnrcdx6Tm\nFWukOgS3yCYzoVPFjuKPuhV+3287ObKAdv3Wb+FgQ+ANsA6XKc0WZXw1jWJE\nQecJHocUKMl9t+WMVVZXd+CAt3o4Bv2qRQIEwH0dV39NzgKilpVcWc9DoQcW\nNysQzilYjivYFEYPmS4DTuxf2JjZ6mMK3d2H39tBp+SHsdPEXeG9ciwqSJvw\niuedgcYTmtVn5dv38Tc+Iuri67B2vZrGlaSF9labOpSIlmv/zD6SDtLNDPYr\n8L1ByyNy7e+ymImtI02Zbj02tlmoV1C7jg5bjsgbglEe7YWQ+WuH2tyIcU2k\nTtSIM6VASBPt8EALTUexqnvS481rQ+vvDJENQ+42kIjMRRS7RVmOaNdRM+Ej\nRVhmL3BfiQhwPIkAwbe9ZG4akhKlQWoO6/M1WP/UPv7Q1wDn50WXO1rmnKWM\nhnlu5ry87E3cC8FlLvVV0QxjX1m5QU6ezsl7AHe2/vHbEEs4Y//7jBmu+Cxs\nUhm0WdYyy8her9Oc+x7NbhTKZ7CSKInFSyMIbUjKJX2YvDvIMnEYruBkg1qz\nGOFT\r\n=kkxl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfFzz0hxL05eBohwrLUp23FSNDv7bJNesUMJTX18xe5gIhAOi6ovZ3w7t7fLWAHfcvsxlToawO4WO4B+szUlanMJJe"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.4-master.20181227215519_1545947802759_0.1788925160329886"},"_hasShrinkwrap":false},"1.0.4-master.20181227222825":{"name":"@atomist/sdm-local","version":"1.0.4-master.20181227222825","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.2.0","@atomist/sdm":">=1.2.0","@atomist/sdm-core":">=1.2.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.2.0","@atomist/sdm":"^1.2.0","@atomist/sdm-core":"^1.2.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"ae9eb619710ef689d1acbd78ea424139931b4713","_id":"@atomist/sdm-local@1.0.4-master.20181227222825","_npmVersion":"6.4.1","_nodeVersion":"11.4.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-/wknu8GM1Zhomdc+PQOKgVrdvQI38s6sb3w/Chms/jKZMgIUupFJ1LWeSDuMVs2g+7lbPblNDl73VE2dGkME6A==","shasum":"59e1b401515734ad18e6b84c4229e2cf83f80cbd","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.4-master.20181227222825.tgz","fileCount":354,"unpackedSize":1323165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJVJcCRA9TVsSAnZWagAAXiwQAJgutZMbsCMJ6wGsyPKs\nj3ZRzFoNjuHDZz9H2C7S2wnedVt/Juv4VSD3c4w7BQx0OBAOsiVJO402fAhO\nJdtJa4T/T6/4ZKWz8FDJHZcVVyntwxI+sH2p4gpYw7lXrHJTWghzyjxuhTuI\nJVIjydwCxmFnDWbJGfN7+qb3LTysanmV6bMkhX/l8W4dOyrpMzU8kfhIc/Dq\n9XY1a5MV8MGcFdhOduJ0PYMmYiwiOiyeiwAj2M+Orf5GLjyhTsDzFmCnJoBB\nskYYlhEH1duNlb8RlRShxncbyXyBhEPt9rR9f8VxwFY00xvING+ff2JsJOVG\nVuCNX3gBSBcq0pdoM4vto1MAnB/sA3VeNC9zaG7vnZHvzhOaPfJbkvi0bCc+\nrDlw8gLIk+LYoi3JR28Igzh/Rso+m4SvuqKmDRNK9nimP7ldYkxitdE6oTXL\nDbqnMAT7MvzQmYbysNuol314Q9m7lElRE3tzgXHi0zYlmnjFkGVFK4B3tOx3\nRKqPhzf/BFoBjk8Uc67WqzXeW/C0oaQwRc2h7lME1XGGqQ6Pzaas2jTUC/33\n/RTl8eT3RA6mBi4X9EGvbkqfviVslJ67QI/RfT80UOSYhkAgW+dJ7V5Rr3pZ\nG0m27HAkfvqkWViSo5ohvQ4SdFISSlltki+RN9iMWdRic3t7o+lerh0Z1Auc\nAdQv\r\n=+hew\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHz/AlGXRAue7rN7CAagkm3pWH+hnjisY9ddVuBkXv1nAiBHkk4gLT8d+kJJQDbxuENRWYG5fD7Vw76Yme13wuIlZQ=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.4-master.20181227222825_1545949787909_0.38561977495351085"},"_hasShrinkwrap":false},"1.0.4":{"name":"@atomist/sdm-local","version":"1.0.4","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.2.0","@atomist/sdm":">=1.2.0","@atomist/sdm-core":">=1.2.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.2.0","@atomist/sdm":"^1.2.0","@atomist/sdm-core":"^1.2.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"0deb47962924707d113dbc71b7286615452e78a2","_id":"@atomist/sdm-local@1.0.4","_npmVersion":"6.4.1","_nodeVersion":"11.4.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-MjlGF2OolCLZjqjm2sbuzk7vA/rYabL6fBGs0BJpdjlVRfmBXnkweXVKAcNf4/7RxbqHUtpMKup5UDCS4MgXdA==","shasum":"e9d3c22ba2b9f99dae4c53af925f08196cd83761","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.4.tgz","fileCount":354,"unpackedSize":1323143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJVLzCRA9TVsSAnZWagAASHoQAJax2eQ8DL4v5ZjWYw0A\nikuRXecYrJCt9xsz+sB/Itmbs3cmqsYJVYSOFEAbgncM6Doex1MRcc31aYwm\nIeWFDZLnixdMf5FQVrXxAVXfrWges7lySbWDYdcsl4MxvfqcKOr3tb5p0Tlo\nxxhrOiFMDq/5Y/sDr0mHY5GAlo8uS1t304ZRnW9oeUoX5vccwSxxMnFpuK2n\nqIjaYNfOtlj/OtsAJwNffckDt1+gOt0waPlLYydKSkoJ9WdmWZqrXS39EY1M\nCI4ztAAnI1ahfEHx8+ws5XGHagVu3iAtBbe49LfhWjD/hGo259VOUqgiQsFd\ndCnSz9SkA+w0Us3SgHOVfZodOEKvWP7o6gxJ+yGAP9KsyC4Z0aUk+zWsi0w0\nJ5dnBb0Y4NfnVpVXXboNh3vf9tCWSYB4IiiTA/BPwLlr0IctgW+NMNmofQPU\n0EynLYPsj+fqBTxQmeOJdUJxDRb1uopjN+9up1p4L8Mzb78Up0BGg4mj/wEg\nAgKvZCMrtucBOq0kDgl/BgzrcsYeSlBPLh9o4mYNdR2LOtRaABo5ZKVB6DkJ\ntUTdsEWZzWRgks2XAEGIC0x0dzzdOsN6TA2NT3XlYbrJQ8NVVPBY7FGgpEJI\n9puD23nTF2XumBd63XmfPi5hzoBPT2V9QRF3RamrryiIuudh1beda5h4vb3/\nuiYI\r\n=0vPO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB97QFQEiikyKJudR9ZX578ElHliraQsff+sWRoaZHBvAiEA4yLCRy3MhpTkT0VcO2F4mpHfssjxbjS0UPRbltsDImE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.4_1545949939234_0.5606965671687376"},"_hasShrinkwrap":false},"1.0.5-master.20190106134154":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190106134154","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.2.0","@atomist/sdm":">=1.2.0","@atomist/sdm-core":">=1.2.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"^1.2.0","@atomist/sdm":"^1.2.0","@atomist/sdm-core":"^1.2.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"12f6f6d4fb87ca659f2c2ce02189172ad9b3e74a","_id":"@atomist/sdm-local@1.0.5-master.20190106134154","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-m5mm0645ws3N5V77h23swck/wbt4pJib5PHHlZ1am/aQNPoWLIrBmzJKexFCixDFICyUk/Nxv6qMqpbz2s/60A==","shasum":"ef27077a09556b42a136d998d7b6d51efb5d5f45","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190106134154.tgz","fileCount":354,"unpackedSize":1323768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMgX0CRA9TVsSAnZWagAAHpEP+wWIIPV87lIccn4kvoiC\nmeGjlUn/jALuZ6hsOf6kyKm8rlEqOoQw/4IfPbg4aGcmIKfBs6J5rLU3PyY6\nieYZ8orEBlbQMAMvWBrCnpsmeEfBB0jS5Uz8Np57+e4zz+cWaw7cbqRmbL6e\npu6vaZ7DMqMg+O9ZanIZTEQOwiwXhrBPvxzjptI5yANkh5lSWHVu57ltdkJ4\nhVnWeK4vwzCNBTA8ubjZJio2LhJbf4zaDhexH1r5bJcAviE+2xOIgBbwKDOb\nPx+oLOsTtwcGaqPytwfPWQQNS/cP2sezx3zqZ+DY62JJwLPjEdotOcNGe/Vg\nctUWvSJBU3kRh9DTuzzl29Z7Hij23P5k5AO5oUqynwBZ/+ZE01qdciilJ2R3\nDOue7j0jtG8YRhONhYbX+raDou+LBOmUXqvL7gRJEmC8cLLNi0gVdPNxTcpD\ntSi2px1MQsCwmv2vgqtRkglRadDVpWVxxsyK9INicLLbyW0vl8q0qFOFCTwu\nmVfiYVUZLg9Ron/ORGcaDBmiCn+iUvpMaLcQvdhkITIrxTHrK/PU0WP7BfSn\nvyj3DYpYaH7ezSepTW/mdj02nP6/XTkHpzXPzVT3nF8/4eCMqpbeFwCOuzfu\nbGggewqlQqkd6GrO5TaKLJ9ByukvHYqgMnYvHzWSbkbC5Iwiw2xA27X7Sq7q\nDWrj\r\n=oJ5S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBKQN4CSA9FtvnGg3cyyu8UGdgZ8BUodb7vbPEGE73KKAiEAlWYza147xDmvnbZfBwWK37yKiBgw4HaHMVIf7LRsgXg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190106134154_1546782195436_0.020270278499496586"},"_hasShrinkwrap":false},"1.0.5-pref-store.20190115124000":{"name":"@atomist/sdm-local","version":"1.0.5-pref-store.20190115124000","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"7c5421137737c01fd6693ccc0f4634642141eb08","_id":"@atomist/sdm-local@1.0.5-pref-store.20190115124000","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-DDIfzX7IAHGP6F8E+H5O1cIxBGTYSwXDWSh1ASCfVxABI6XtmfHCD9aWptaLuWeVZkoeYWPF/86td381Uwim2w==","shasum":"11e70890c04ad342401fcd351492b661ff362c50","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-pref-store.20190115124000.tgz","fileCount":354,"unpackedSize":1323906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPdUDCRA9TVsSAnZWagAA01UQAIK7D8pFX9A5GUZx0gNM\nztLxKRuzO7oIlG37TiEW02M0HdKqDwOOKGA7Berxr34qXQGMaR5OluZReE8n\nqJmRryxKilGE4rVjQu2OwrUhDYKYeWSL6BFQxgGvWQ+kyiAfJVSMlRbzHDcg\nlhebQ0CqmYpAHWz8STluZf+KhTSRsE/8yY+Nzm2t3j5iSUVJakZrfcI+j6lq\nDLGVzhrBpxQijGYo5dbHVi18Om4ZeRYvTXLYgpUI8si8XLLx+OgCzHZLJ8Ke\nWIrkS2BWyi2L8xiGR6+YNyKBErIJTGQ9d/tCVIEFnH0G/R7lhfjwpJjCY8JP\nWQCtOpcqgg9Pa/sVo33bba+JGLqdAYhT9b48/t5ly3DsQZZQ4wQXk9vboOi4\nKMV3jUjug47LkzxFJbWm5L+wtiaWFFXB9JAm8TV8UOAIUjm1xBBcXmaqqpLJ\n6Ytg4um7CIvTiyFAIL0h3aDJQLQ5mmKkiBVI5PAYWawVm92jOK5RHpDaIp3M\njVL8MG6YN0HwwjOOB8WMCK4iJyxL/fF//lR7IzkJ62dr/nad37J+qtkNnnFO\njSTyzeOPPNXkNs71CyFn4tioNmHpk7Xw3mPU2VUhiruXyqgp/Az72lFQ6zIA\nw/1IIT+LDNWQSVFg4svlUVMnuWO7VX6JP81hXm6B9ydtxhHCNTmHIKGZZWEC\n5PK3\r\n=vy6W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIED0aO2Wf7nSlunKxPERAPzXREYnakispLpGp+UXpT+rAiARGjhQXzHl4Gef0trGZTDO13Bt5zGKs3Q61AqOSYGipA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-pref-store.20190115124000_1547556098643_0.6323309460824103"},"_hasShrinkwrap":false},"1.0.5-master.20190115145224":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190115145224","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"a07adfe46de9e06b520e06a92d40f71f91507238","readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","_id":"@atomist/sdm-local@1.0.5-master.20190115145224","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-oVcvBI9ZztvFkqO8qL6pC2N0BpZJRopMJZa22pKliogRTaoONbG7do4G7CZrY/vu6vDBaaprWs8C6M90aq+f+g==","shasum":"a95cae865bda03d1948d44472d81a80b849b291e","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190115145224.tgz","fileCount":354,"unpackedSize":1324021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPfQQCRA9TVsSAnZWagAA+RUP/ApSKu3nYQzAiAvzAvLr\nlBdJgavBLwBzYvGgGdrC8DuQamrx1G5AexYQDyTpZgIrvp4RK6MFeqGIcG6b\nXF8mkGs8r9RH8DOf4Z57Cqr0kC0VuaWB0URo0lR/D2k9Qh01RVltdL+bPXRg\nrKF+U115Qduf8z6eJBMOQiDjlPQ2XxLnurg6ixQeGzXhrkuphx7Jlvm9WraZ\nYt2OUua8RFAdO9TlNmi88moun8Mc1CL5ksQ0ASeEbN17wOO55E3b/QE/BFz4\n+YgsQ3m869iK6rcVbusLFnQSMaXMvxukrdF1zDYqn9CmR198iBjVJUW4NAJQ\nZgAXzRJYXOz0wuabIXg3JeC1oml3sE9HljpRwGHzn4oZx7SyJk5HzIAN4TVw\nmy1qpln0Y8f4HIAVvVTRHCRB7qocZgoPscJ788VO00pIZr3gFaccgnzhmm3A\nYl7hh9XWQDQj9r+evQl6EvgnMOCXyPSdmqv2RlsY91Kbz+lkQTiOVxCUONyf\naGptZfa8k450I5bBln2RUvt71+qc+WxE55fyBSD+Mle7FvV77/FPp3W7j+8/\nx4eabbZ2gKlPsbMrL+3B6krIakX71xWE9Vk8ZO5G15CzIJkw5D7cpizdzK6Y\ns6aU3FvIv8Exut8fwtEdUPvz/M4hXcUj+W+hoKjpvMIpSAisDfO/gtplRFbM\n+zLb\r\n=mPx3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9sDfyAwR9CJ49ansfkzzakodER57ZHxmhun61HWveSwIhAI5ojYcbrYXsYV7RyPW8PO7GV+YHYiD1F7bX7YC4ewBr"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190115145224_1547564047667_0.9045969476343587"},"_hasShrinkwrap":false},"1.0.5-master.20190115145628":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190115145628","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"3882f68d1e5b107eec0f3777979cd8dee87a88b8","_id":"@atomist/sdm-local@1.0.5-master.20190115145628","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-LvET6xsT+grR2bd6Z7m2wTJ8PPv2evG6LZlI82C6cjBMAYXbILWuzQQzD+m26MGZT24kaTg1XojbejdBeLPFVg==","shasum":"d304406ac72730a1648e43348b3c44fe22f6a3b5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190115145628.tgz","fileCount":354,"unpackedSize":1328706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPfUPCRA9TVsSAnZWagAAgB8P/0zW4BYLl9Zo6cRNvOEt\nb2y+ZZvr54az3wPb6tCw6BgAWR0wb2j98vQeNDjvMr5IZSZ02s3NV2BS7Pnj\ngJgUl9xDyuKyP7o54TE28ZtbJS+fe0viNlK5Ukbo8uIoY5j43e2xh63P2re/\nsq2/MASGr7RPXpsdhgYllahQkOQfQPj7RcOdp388P/l4RGq8cV4h/DBk1F4r\nbsM3NUL5qbd59Vs7RdzPpgrGXudK9aGtzpaNHoLjE/hX6kl7kivKiIP3+wyY\nYbcVfakqQJKsCMNQJRi7c6cOkpfSMW/7i7qjA94/IfX2iNUpo6XrLK+sjLoG\nxe8xHL72FEo15/MKCKsiXnHH2H1b7sntJCEn65xsx7iOYlSoPODSsnA0QD3I\nms9l4uq3SLcUb0SxO9CpVTK5m5/TavGETP7E/LoKKgUqSCDDCfZKicnFgA8Y\nIUVn+ij0kZD1PMY2Sza+gMZA3OexOs1sywLWydTV6mF2fR2jbbgDfPW4N0zl\ntd9ZWkCfKV8P29a0Z8a/IiFi8yWxI35MIvEiHrQWbU1vufwRZP/MBHegbM/0\ncF1b1UIexUDC17lFvzaaQ6BPruZ7NqXDue0DhXU22NM7n0JA6tGa+vGFwwRD\nalbp7osBDM1CmIV/jKxktZgKogbXEX0XM/UZ77W1ETEJQ9FUu9VFsGcepIcG\nPAjS\r\n=6Ece\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/YOISW2YHlaaF3aKS3TN0lpVyJRUR92lLRfxYJdW8FAiEAr1DWC1B6WhKpMytEFegXptpL0hiRRmN3e3K5GdWdiyk="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190115145628_1547564302419_0.5862629155278027"},"_hasShrinkwrap":false},"1.0.5-nortissej.log-ports.20190117204627":{"name":"@atomist/sdm-local","version":"1.0.5-nortissej.log-ports.20190117204627","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"bfc837ed6d944ec41ace3481a6ffe8db46684d47","_id":"@atomist/sdm-local@1.0.5-nortissej.log-ports.20190117204627","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ecd0LxrRM9SecXnc6ia8hfv0nXRYzf8Byyn3wOU8AF9JKA7cgBqhZmnaRNp+HNUqpc2zez+JjFW/YDHsiC5rpw==","shasum":"33e27eacfdcdc784099a03ac0d73be4567c309a6","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-nortissej.log-ports.20190117204627.tgz","fileCount":354,"unpackedSize":1329299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQOobCRA9TVsSAnZWagAA8LIP/0S8zbet4ETsSV3ZfdqH\nbgcifwulvnN4+g+It45qnXSrIzETLYcMI7VEHxTH/5dTvOv1KEolKMH/mE2u\n2YPuK9E64kVzZiaWNTm4RTBxBEeEun+0pGf8Ddkgbd6ZK2/XUkmWmQlXSegB\nBlOLm+CTwb6wkym8mFncGsGDMMfdaZGr55DnYNG6D5yTTDCVIaUoHnhCPbRb\n7V5Y+62QZBy3HWdjmIR48Ic4+KEm+FYqmw6BZQOO89xeSizVJghFsiD7d360\n/WCw2e9GjXynxkLqaCgCZCGMpKuha0wuELOJX1uz/IASIf+bbWVFFFMm+M2b\nnBN178gOAwxr8nb5Rb/F+XDA3koA+qB1uL9kKaaJYIpfdyVfrlhcXwToA4tV\nd6EDf+X4r5N6Suq0TmL6OYBejg+1WDLmQudDdsocmkmPOIqk9l+vXbb2CA6P\nj7937GFwQEoTobFPdGWyIfZh7i1OAJrwPTg7Xy5UdXNcB+7L1jnFQOXRtnjL\nuHzag2R6Xh1DAa3gNpOr28d5LzSjosn96MfXkh57K9OQ1ZTtKOfyFRkxBWbH\nNNTfMBqceI9IlUxH19aUR2nD4JRTbeRjb+gT0/NfULM5hBpsAq+Ir3ILbiNB\nFe+gPs4UCg1loWhRmr8MSlwVqQyRMMnT/67kqpY0INNEGGqBfSmO+tNgEQx8\nROpI\r\n=cOS1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRmpTGfMSklJJc7nSAFwmjvogdbPNjbcNxTrZhoS86oQIgH2E9ZnvO0z2cIxr7r1K4yxiXWRAYhOZuwsGH4jZBZf4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-nortissej.log-ports.20190117204627_1547758106582_0.8650751258030949"},"_hasShrinkwrap":false},"1.0.5-master.20190121144327":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190121144327","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"3882f68d1e5b107eec0f3777979cd8dee87a88b8","_id":"@atomist/sdm-local@1.0.5-master.20190121144327","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-y1gIbgzkkZSiLC5NeFp4IturGt4vk6yxjkpb/bPeLJP14ziDPP+tX3oKPedIAdOrAUM3gN24OCU57lNS4+QZbw==","shasum":"c582d88b09ae72736990eb800a7b9ac72c0fb342","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190121144327.tgz","fileCount":354,"unpackedSize":1328706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcRds7CRA9TVsSAnZWagAAEL4QAKFmAxj23FBAyKlJULEE\nkVze2oYiBC33jhUBYUv7rfj+FDuS6/QbaaAjpO7N5K2twzjQe6zjCMcmUuhY\nYz945ennN7VPjMEA6UN4bG7YTB6Ve12e35sHV/OpJ9xTQ/3OsVX5cuXVd/ts\nll1ZLUySYCkNY9MnGAuPMibnRVToT5Po+7j53NM+2gRl3BFcKvxrLu8caJTV\nEsteGkuSBrBnhVNBxdljNVd4Qwww2LSaUavdMtqQJclSgW6S+axL+FdFAY0F\nDKKh5Tftrg+bNVQ4sDApNIzkXQXjGtIlVUgmclfFG9Dc2GpEArWnuGRFB0AD\nWtjnwsvmn+VnrTIw6kV20t3+jl58TiaSS1yUbJtgh0160lmfQwkeSt01y4Tc\nrfF9nr7dIFHJLnmY8M8QHlvZheSEITis5O3EsWdZ4KA5A7/iRlEMAl+x28Vi\n70uQEaLhqChp6NdEUVxtybfJknwHAGTE+pfmxo1mzlU+5if6Nq0HrkZL/cMw\nMNUoBdl8l3SMYSJ9RlEDXRzbxOvl/Nz7+fYt0ILW7PKsI/Ac1O4BvlsMhbsT\nf8MbH2kCFsEUYUV3v5aNYmin/Ix5qaDoBaX6/U9Fk7KzX80lo1+r5zNxhTjc\nwIF5WmCALjbuSXU5NVpVL+TqmvrhFysP2TDADnbX2ABQKgRMz0eeOpxA6wr8\nPgiR\r\n=3/Mr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFvTAtiGNrBvUOLn11kuflG7aXwXAQyFuukmE3tGlvm5AiEA8WetreiODWM7BIiHynjMghRDhgnba/fhQE3RTmIGR+c="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190121144327_1548081978622_0.836574165111212"},"_hasShrinkwrap":false},"1.0.5-master.20190125191628":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190125191628","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"40871e36879d532cefa0aa172b0ae069c116207c","_id":"@atomist/sdm-local@1.0.5-master.20190125191628","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-NjtjA6LhV51Trf/AKNppJ/2I36YO9iBJ6J9Z317tcv9VwW8q/pwnntodMZqG2gcYAxcrKzJ2Tn6BXKSmnQn//g==","shasum":"e055aa486231bd6071e117e29863086a166ca1d7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190125191628.tgz","fileCount":354,"unpackedSize":1328907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcS2D3CRA9TVsSAnZWagAAsnMP/RkewTvf+PvuICR5lmsc\nvqEqlXfp+DWQR7VzO5c9KecRqu79zEFAlroHKo+X34Yc6Nf9D9Bp6YRImJ7K\nKBxYpMbir9sJjjq7KDeN75sDWHah29qiRFjcfeEchgmbCA6Ced7/2u5IPKwJ\nI2TLSFOe1/5V1Kt96pTzfnYjL6z0LQFU5DYV5iBuZyq25z8Le9t2DlCNstA0\n8qnbxCHFysXaBQp6DBZJsTcubxu+5vabg7Ccw5vCyk8pfl0V2LlZcNpE1RHO\nklQe4RNLfNSyHLeWkHhvMUGaCwD8FzWdbXvPfNPGQIDrTHWV+Il20F4ULPQn\nd60uYxjVEJk8cZ38ZkhlNxBpcFabDqAwc3S7V35Y4ZKmQXt487CHr40o77pv\nqm+XZRI/zDONUeAK9YwOrSB0E0kNwN3YCnMopd8iruT5CspRnqPl4+mKJI1Q\npXaFyQbBsVBZZWUzmnpIfginySjLS2p/FY9OwK73YXyl1d/ZBnr9OCzkkuTn\nT6xOFqFbIev+b8GIw2Z1TmTZZKcaoR7kJPqmsKfFXcfwzS7C90R36VQu/k5K\nA+ThO9qwKPVZmY1uw2F3QE6uDk+BL+6nGSzM7VmwyardE0HMemhi1GLa2jT6\n8/p6d8UFgjXOAufZOnum2EFDiRXNkDBCLw8EsCtDKfUTBH7QgpbJ+ciK63TW\nm+gI\r\n=/ZS8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/dmIN+wBxo55XtDC2haG4d0fQhqsD0adXZjM+z8azmgIhAKDXatZyuNJuhLPbIiy31/Hw+IRw6ItwMTEgFwoeYQ6X"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190125191628_1548443894012_0.2667842986476805"},"_hasShrinkwrap":false},"1.0.5-nortissej.print-fields.20190130193510":{"name":"@atomist/sdm-local","version":"1.0.5-nortissej.print-fields.20190130193510","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d65cc0af3cf4a72b7a6ed61671c384e6efe3784e","_id":"@atomist/sdm-local@1.0.5-nortissej.print-fields.20190130193510","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-07nv66TjGF9n1rEw/2BF9LHDiaePvKd1g7g+x3Ot4I2Y6LdUONbHSTnrieVdR8QiexJgZlP2xLKUIOrQWaQ3SQ==","shasum":"fd0805643d888e1eb646681bf2b53ca3f38d37c4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-nortissej.print-fields.20190130193510.tgz","fileCount":354,"unpackedSize":1329212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUfzQCRA9TVsSAnZWagAAcEIQAIulvdTQIKI2NZYpYhso\nP0aik51N1dXaYKy+dW+rRQ3MwznVkFE3DJNi/aOTbPrTft/EOpSpeuWSexja\nv9LVUr6YKvfVyCzsmdn0GA2Euyy8qVeWK7X1/O8Ie0pazMSOsBBnjKjZ4Nfr\nnCr98kDTvXq+v9YlHJS2rMMjrB/cLlub835QM9n4RwbqmUsc0i8LBmFdIKhp\nUPrxxO6oujxwgDMUfpfejSS30icWUnL8Lx9t8vXqmLPLJ5SHcoga3GAzR5CF\nIC1R8lSBiw+yiYZVqj2JPuiUvhxT1zXkGdr7Hz44PtQwweBJopYSTUgyKlsf\nic57YRtz0Yi+86KqwbI0Fv+McFak9OnUxuOkzJi4YFWCiNwvSkBzzkUFufUO\n90EspVTnNK8eqVzYc+a0Tpy3LHWRma33RUr+s2zAnky73XKTNhLFyJwlYd50\nIMM2MEzT0y2/0a4TMT+RGImtnpkIthFzdStCk8Oi/K3QSgHTMD4uSNqn1WQm\nvRh/BKQyvXNNppgoqNcJiR/h5c3Wx14oVfPsJnsqWZR8XuMTnxT9eIsNla5z\niqryXPxb6dKUhrPFI0XAZnbZtp8ySL41y6WX02kaYfRPrAXC9ffT9iunTTf8\nwkixHMpWLLNe0n238oksAzEu1tE9BKmUC2tyszZK+jWOfYDjBkDgxNxw9bZy\nlZnr\r\n=TLPS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrIVuI1VMc3LwxDTxlyWxv8RfAetMKtGw/0D5cinoRJQIgIll4jN6svj1FTL5tiKYC5+4L8Avf0xZKcc5174kJjfc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-nortissej.print-fields.20190130193510_1548877007994_0.23752916314211037"},"_hasShrinkwrap":false},"1.0.5-master.20190201192832":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190201192832","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"aecf2c33ff4a9aedea96ec740a9e9ab7f5685378","_id":"@atomist/sdm-local@1.0.5-master.20190201192832","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Ke5QmPa0PsguDnFGNXFXKlkGHtvu5sJFDELCEIwUL/IbkWHLYKBnPVvbzDlE5DqHzJk1VlNSkg5zz30Yaw1/OQ==","shasum":"12645b535bac57f838af76f332afb5d6a551dedf","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190201192832.tgz","fileCount":354,"unpackedSize":1329196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVJ5GCRA9TVsSAnZWagAA4mgP/RNgyn72J8LF0hUKr7GY\nxTO4cCvOj76rNA+hd/b9eVahQzXLV6JEL8Ctu2kvAm7OYMENm1OvAWSO3gnV\n90NP+nqlNxfBx1IpjhJyrlaBxViHY8BZuEsmBBuQ3P2lOTQ2h19o9jd7CYR8\nFUyBBnZODdYG5sPGWwkUdQpIVzRYrTHHGOIB7DUe+ySQgJHJSmBCE+iFroS1\nJvSnZPSSPSLw/5YauIxRKeV1+uQuW/zBphZoHi600RY0aRpv7OiTHLJyrwf2\n0Qu7kA7BYpNWq4zbVsy+a2ZMZDM8eU81pfbhyy6H5YC/z7O9u9uxeHjZ81y5\n1cUc3hHU/lsUpd3BNpn1AUQy+mnbqPix0CaiYyXDIY5ebbCQK1bG/yEi45EQ\nSRBtBRC6mSP+QR8Zwtf5bBq0lRJTUO6ZupIdEBtj0GeTpFVxW1DmrCVsex+n\nWDzgPzziylQ4fOfoIJU1kPfYZPKzdwYmqIDgKecpBAaxV9XCta6Hvmn9eFts\nz+IrORaZr1KiIgcIiZ37brG9DaD8zWMMMIvE593CnZIRK4rboi1BLhjOIs9W\nFJCy/vgQG78Uy50zF+YfqIgXgA/dpIwyUglIQUdqlox76FVHPuIwHHHUiVTu\nDdhXxzlmun6kBt6VwZHHaEstbayJEK/Jqm4xvd3pnWHRz48XzDLJv+hEOb4+\n0QXZ\r\n=w69G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGsOoLN0Uc5DZm8UInrYEsovUrM4MhhBIbAbRw18WmlwAiEAxS83f1nmyJbyjPUymfle3Uvuyx641ITA/LJz7QiULl0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190201192832_1549049413823_0.9049437612466431"},"_hasShrinkwrap":false},"1.0.5-nortissej.ignoreFingerprints.20190225221904":{"name":"@atomist/sdm-local","version":"1.0.5-nortissej.ignoreFingerprints.20190225221904","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"4a9a042a130f0e12a1a56812378ffa24c44c37fa","_id":"@atomist/sdm-local@1.0.5-nortissej.ignoreFingerprints.20190225221904","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-E0bqEdbh9z3Ltw1hXaDOWKqsfz1bEtZLr26JW/up/Y+lB+/e4VFYmZRQn6nzBhZ+7rYDnohS69VZiVOenKaupQ==","shasum":"974fe6f24c5299744dd0917e2413aafe998aed3c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-nortissej.ignoreFingerprints.20190225221904.tgz","fileCount":354,"unpackedSize":1329653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdGpICRA9TVsSAnZWagAAV04P/3E4TcP9+O2F8DeKg/OY\nKgdVH6BrKObXsqtltxQu/pEKqyzH0xFqlTylZqGXzzQZGxrJx0zJQDo+Dhtv\nB91QB0rrx/4iKbUGaiaGSQQMLORObydBPbXMsufBJkqDPnknj+S26XNV20HS\nCZCr1xMyQfu0rXD+pahjYIeCC+uBDfwhl05rcbnXXFghltdMaHtl0k4CuABY\nNNXAKFpYGmTMrYyVIf8BDwPHGW99C+ynkrdbkq1WthakAgoq1EvcEgxg98wv\n/tKPDOVVjVE0BdyBVuJUcpLOP9OJwMvUyXcuIFJNio/4UNpSWyStBzPGtolO\naGgarNSaR1qO2sw8bOGmfr9WanK0lZN2pejmsX0HJvtjynneh5/aHZ3SaD/l\n0anvSR0OwETbCRxtTiRYwFeXDnw3kmWgTZ06IIeajAefLMVq8ryBSRBmkJFU\nCtMIBoxzoXBy1hdmvY090/1kHmo0pXtJt09lWB+s9wPeP3VWi8UbzN+mpVBw\n+RWCCbP8HdBtjxVnfAwvri3MAuU9hZsQN6CY4eWDzf966uiHQC/qdXZPVD/j\n4uHLk2TeWnHKHhgqGqHj9FjPk+PkeED85SOIFKeohMuSY7i77NTd4dYj+zKG\neaYrTAWPAmWU5jSV622JyWfEmBfg4WgxVyuRkKi1Ksc5P8Faf1HkXs5Uvag0\nX114\r\n=Hpav\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjLxeplj/5BFa8Ho95dUYh3/Ky/uc4OMKNn0YcgxifoAIgeASXwLtcOPqux3hFPuA3Up6RqVdZm9lEv95ryNwIUvo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-nortissej.ignoreFingerprints.20190225221904_1551133255885_0.46238075858911243"},"_hasShrinkwrap":false},"1.0.5-nortissej.ignoreFingerprints.20190225225639":{"name":"@atomist/sdm-local","version":"1.0.5-nortissej.ignoreFingerprints.20190225225639","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.0.1","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190112215508","@atomist/sdm":"1.3.0-pref-store.20190115102339","@atomist/sdm-core":"1.3.0-pref-store.20190115122541","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"b22b33e3009a4e2db6257537af08aa4bf17f92ff","_id":"@atomist/sdm-local@1.0.5-nortissej.ignoreFingerprints.20190225225639","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Iv4nq4KXO+NotrLbaOX0Vtvd+5o7d9U2thYK75CJx3MOFqnp3qx5keDFeGoG5bvC7N8mYkHUvmvNSnv4y8udzw==","shasum":"68615a48395a94792fdeacd39175288ed80e78b6","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-nortissej.ignoreFingerprints.20190225225639.tgz","fileCount":354,"unpackedSize":1329815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdHMeCRA9TVsSAnZWagAAY/0QAITJQ2oXI+Y5/mUkn7Jq\nZ6EAH4ZB1xbagYzdBQNjH/lL1V7JN61F4jFVIO+eM2he7JjhKN7Y5Ygw3HBC\nhJ32E5Cze9TWZ2w1fhkT2lkNmiS07BROJ6QbMItRQVtouHHJvTGEAtUeIP4l\n3JxyjqHLJ4ntVkLYVSFvALfCogQZZTcATHRRfJy3marmyVlw9ExWwkaFwEHf\ntY46ghtc0aTi+2wDZmnmuXaFrR4xWrc+02aWJY9P+Vb1ZiRWTAeHbt5vHMhl\nfSK4zLDKZZTv9RzdUvKhC5KIP1+OiIJ+Pn9M3LO9Bvc1iB5t62iw8mkSxycb\nhmqz1uH10Q+UTx6JibiSW6dzDJDYzhsy69CEkTArII5GFcNM0pskVXy7/EQH\nrOB+XPssLNdvZcGntj8LmHQuJU0PaqPntgMwd2ku6t6RD0qJyiOMNKtPAUAX\nhtyMos2C3S5zS1/qu2Z1Ju7waZZVdrwlAedZltpU8JGFuXGIFsHkU9NeTJml\nqRz9RWNBWHaN5bn2biZthJOxHBv3mFUOEOYUp+jf38QePi0LF1m/09XmdTk+\nL2hJiw3gLZbFI9TQovHCpIU6xYgDRtnq6zoEZJw0uX3jCx0JM8pBe6lvZAFJ\nSbHWXXXiDhmsNDZf8X1o1O1j3V2EEPIWWZruPjq75ht8y1cbs/An69YUj6aG\n8euD\r\n=gibZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQCRL666YvykxMJmSDEVPDxDF6iau0VEm34rtCwFCkdAiEAtdhToVX/VYIQdpKIoEBxvk48tRUtczNahUWFrReY1Mg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-nortissej.ignoreFingerprints.20190225225639_1551135517482_0.4813052199916936"},"_hasShrinkwrap":false},"1.0.5-master.20190228205547":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190228205547","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.2.0-master.20190222012515","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190228133619","@atomist/sdm":"1.3.0-master.20190228140124","@atomist/sdm-core":"1.3.0-master.20190228150911","@atomist/slack-messages":"1.1.1-master.20190217194316","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"ac60f1fb02273d303c2cb1e26e41592d45e67238","_id":"@atomist/sdm-local@1.0.5-master.20190228205547","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-yjTIz3ETeOyOWoRtzmYjCPL9XO7+I2cvkNnKDQ8+S4YLo4OH3IgH0XxFqaHoDpyos5GKkJPA1LD479PcKmN+ow==","shasum":"9a3e8ac1e434847eff779c9786316f3fe802529a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190228205547.tgz","fileCount":357,"unpackedSize":1349348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceEtgCRA9TVsSAnZWagAAYFwP/iGTpBggVrR2U2btExr0\ny0gOXt+8VLzL9Czp0fOCa8Xc6u49X/OVlxQClk1FoyBehU3p5Xjxw5UyT7hh\ni5MW3GNsK8Wow+uA4AaKahCPOdjALHvRCoKugzUhaRd793EDnA4ocbdh3hCQ\na5fqSpx/lvF2RQiIymexG0aH3ekT4frtjOrq5rSTqKMJYXdmAer0kilVdjmt\nfxO/CpxXr3OE1jUp2l/LkdRVjVKEXOlVGzdhIeWiWi/aNx17Lr6HFc04Asdq\ncWf0BEHHSSEww3Saq+yj78GBnEKGOEiaMEOmjWgf52hCFYOfYRtLIYaJph6C\n7j4mVFvZGHmnfH7QIisC5yejyqrx1V9odpe5/ClHuTfoXF4rjANCa4fOKR/K\nOU5uCccm2wAa2HeYgFuZZROaB/sEDaPdoYpDXqMkl8Uz13u0UdcSyDuWmx9c\nj8JKxogbkvkHAPkWXkRgycneZbQ/QVdDAnZyEcOS4C4lle46jUPggkLhZi3n\nM4Zot64HG39/7IJuLtC+6zKax9FVQu/4Q5XA02z9yul72QGMMI5O8WDPQRea\nCHvWPTMI6nkgnOZ9QSlVUYtv4F1ZLKkH/IhdSqGqLMzhTvooMS6ONmIinoOv\nmCReB/6ACbXJqUGnsPILEd+/uI2WDUNgjeAgVeQNydrNDhXzionuwcaNO6tM\nnp//\r\n=St7O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJSX25LLJ8k8QC+Tup9p8wtrZsUJ0szHvKc/ObO74N5AiEAwVRcFynCkJ+4AiWJExeO+Gds3LYxySzm0L7/77qwzVw="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190228205547_1551387487593_0.15281851273395808"},"_hasShrinkwrap":false},"1.0.5-nortissej.extensionPackGen.20190228211557":{"name":"@atomist/sdm-local","version":"1.0.5-nortissej.extensionPackGen.20190228211557","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.2.0-master.20190222012515","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190228133619","@atomist/sdm":"1.3.0-master.20190228140124","@atomist/sdm-core":"1.3.0-master.20190228150911","@atomist/slack-messages":"1.1.1-master.20190217194316","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"64cf37aaa16242584a58990faa3237083fd5101b","_id":"@atomist/sdm-local@1.0.5-nortissej.extensionPackGen.20190228211557","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-H5uswZKGLTwkeBq9Cop1bUoMaZ69RoWUV6S+2V6k8syO+vmNBBUs/GIMKcmufzZPycpwQn+FU9SFTQO9qXdKlw==","shasum":"8a9acd4e9a666d7991be894645942af2cf7850a4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-nortissej.extensionPackGen.20190228211557.tgz","fileCount":357,"unpackedSize":1349509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceFARCRA9TVsSAnZWagAAvrAP/1GOLhBb5mdgCCdwlw9K\nCFOiz6sG00N+ikUBeZ1hfjRIXEz8a2eM/AVNKizA0xurFsDaT12QjkzZ4t04\nAmFR+eTOiE2/mLgAAVALIGD/pYqSLXIEECdgmvc3TkuhCfj5Gg42SkNKQ03J\nD8G8KHhAU8602TyUMRAQRcDpQ1MEcNXKWkfghgEw2VsfJlA81WXrNb2nyeOu\nogACgeuVVB7Tu3XUcNKtwcADE1ioSxqkjJRwCFPIARLO4HS9odn9exlf70UE\ni4DVW9/LgF3qN5q5lbHXamctFqChGTb/B3Av6LmjEpl5AvxtYJc64kqtrTgn\nTUSveDMyEkaTigIA07HPIA+trhqC+ahuBgYsLHMrCimEHx3jNVbyXGwyB8oM\nFBNIyPiYwYIuilckuO6edW806gkWRHQzWjkY9gikgaq6O+tfO9Z2JUo9PdYt\nA+sO8rA7JtQhfyouvmmv1YUi9IbF8QmIjx2xdxbc8P9hQA1onyxpjVvVE5Tl\nJAInF5jY/2vlslVrbR2gHoSiMoLuRCysZkkpwcIru3lgV6jmJpDcd2GbN8hT\nUqHHN8fh9Y6KEZyjSq5Kx7s9VICV5j/mRdobionIduugGmIUNJDVh3Gt0QUn\nUVMGhlw0Yi17Q43m4bJq1G5GnbubGw0NZBKeX8H+MDAPbsrk0UYTdCIsmS8/\nE6nY\r\n=tIlq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNYd49BVfM0P2wmsTCVKvoJerOI/ubTgUU31FAeE66DgIgHbxLSivAUG3uFl8Frnn8xuGiwW9+szrKw1Wc9YeNZtc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-nortissej.extensionPackGen.20190228211557_1551388688713_0.9887624074827945"},"_hasShrinkwrap":false},"1.0.5-nortissej.extensionPackGen.20190228213927":{"name":"@atomist/sdm-local","version":"1.0.5-nortissej.extensionPackGen.20190228213927","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.2.0-master.20190222012515","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190228133619","@atomist/sdm":"1.3.0-master.20190228140124","@atomist/sdm-core":"1.3.0-master.20190228150911","@atomist/slack-messages":"1.1.1-master.20190217194316","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"c739e1404edfeec6e63ddccc4a533390f57e95a0","_id":"@atomist/sdm-local@1.0.5-nortissej.extensionPackGen.20190228213927","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-Jlz7WTIzIjD1jSf7QoLZYGXAeC9gwR5GjjTyMpuYizKfXclM8Q8ZTexUhnQArJLnb9D5lBWAV7+kBYgR9Tr/FA==","shasum":"d91fd1264843e23d1cce9de0949a4bf302853295","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-nortissej.extensionPackGen.20190228213927.tgz","fileCount":357,"unpackedSize":1350545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceFWMCRA9TVsSAnZWagAAeZwQAIHnns97XD6TrJu3IqOh\nBFwSjevRZYlGqbZzdMbqALS3eoVITmCnZvWS16vnDEyXNEf4Q46EXHWJTNPX\nQ7X0DJ7vFf+hcPup06W6OD4A3GBKQPu2haOGBarKFoPySqqgm9QpaSMC18hg\nOvUeIIqz1IoeaXW3bQ/4Ksp/tA1izKHweQi0gJBOg/vcvGIn2KRYL5WdmlEQ\nxJdWybRiayQVEEq8Ld+aHEWGPXrl0B9Qc3FFJ/rM8T+meslxbyUoaRcT5wRz\nGN4yVomzDxiQVwbvG5de0nmgKhyonJtRcwXqrk891toL2G5fNE5ZkwU7cyMm\njgQm/MUEOQEFYjoH3izwC8mXb599twJQjDCqxkcRBhwltsQ0WBSDj33dhd/4\nRG2HnZz5g3MAVt0EedzPfZa+LjeTqOm0H6updFT8zWdxcPq+Iyn9tN3RvKmu\nvZ2mUuz+hX3N8v1ZpG7Q1q7S0b7NsE6HqkCs41Wa9WpAEY9Sbf+3ZSdUZZwX\n2g4tuSfl02ln/qQpHhiZRhKkMwaNt/mxjgbo9sgw+tSeV4itgdNr4lfuJMoI\nA8O+qS7iVowiaOU8cKbAIFKWJLdWrdscbs+90fLHc2q0vkY3LYXnc37rjuAn\nuXy56t8Eyiz4inEo5a/avXjZ6B/gSbDqfx7lStp4JbrptaiwdQbNuqPF5wvy\nHHBu\r\n=XH8Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHycwGbYiSiy+P4aRVqiK8s/lFuZmVAA++nR9J5coU2PAiEAnLvM1PXC0/lL5PAdR2kNoRV7SgbmBTWuRjv0uHdRn+k="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-nortissej.extensionPackGen.20190228213927_1551390091497_0.12729927183115297"},"_hasShrinkwrap":false},"1.0.5-nortissej.extensionPackGen.20190228214911":{"name":"@atomist/sdm-local","version":"1.0.5-nortissej.extensionPackGen.20190228214911","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.2.0-master.20190222012515","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190228133619","@atomist/sdm":"1.3.0-master.20190228140124","@atomist/sdm-core":"1.3.0-master.20190228150911","@atomist/slack-messages":"1.1.1-master.20190217194316","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"8a3957d07c39347011edf6dc0b77f3eec0a0dce1","_id":"@atomist/sdm-local@1.0.5-nortissej.extensionPackGen.20190228214911","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-jiY0HUU6tElm8iVo35AXr2nXXu8Fr9OlvsEH2RNmqcU2gIUDd5tlUhcq7TTUBwcAn0H+UbjO8mC7C8KHoRjx+A==","shasum":"d6bd4eae44a085ecdaeefce5ccf816f270215726","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-nortissej.extensionPackGen.20190228214911.tgz","fileCount":357,"unpackedSize":1350721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceFfYCRA9TVsSAnZWagAA8h4P/0eCcVqF+rJYNe15Joz4\nIUkx5J8JOILldxeT1tZ5T/AlxkjmVRE3jBiQtOQH1Ukjj0mVMxR/3oNcNNmW\nPK+Af9u1+rlhlJThNMCmU5ejZYuq6G3wVGPetd9wmfHaCUSpiKILQaW6e2kL\nAdlgCoOs4FZnve/27StYFsDC2YLf7ckxCa/zzS1/ePEPdeBcR5J7gwkyW6Ls\nGhfp/NiV0fma2Fs6peNyuHms8iAi/PjokWA/qJ8uJY42EHrS2FrQLfhenO3h\n+4guIBLXEDq2NcXBypKxr1sccFq28zWhzKJxHcRvrHfpbhkoDkrvTui9ahER\nDnPNP1cdFyN1wB11bejdWaGHBScPnpz/77S/2nJ1R5qYf+zVCTXozy2L6OR1\nkLIrU0BAw43GzPtS62gBW4S8tIidWi61fTqUQi6+ecRZyRld2KY0gb4xoQa0\nrxbEvN2JmBqT/BSrdlHiKufgKf4bd9E9iD+4LO/zbP+dLBYB2VHU2cPf440p\n+t6RLItmUBkrn92ThePyJ0/zWMZEZZZTOo+9tGePDchPgz65dCBDUUDPmlBO\nAvhbkGBIYsD+M1iyuCAROzv/m7CDIgfuOgUqoOoSZjMvK3JZwjNYlgi4XCw0\nb1LF/CvLALw7xGtJmu6gVQxH28zNoeJp8P0HX0Fjwwp1colcrFADqdmAcLYb\nBEgH\r\n=TAbe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDg397ouhMq+oTMeU61k0D1BJBrOYT3qIdrqt+hmPw0nAiEAlYY+6cx3SITIw/WM83oZ5aKGlCQHSmfstyIIrZegdxE="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-nortissej.extensionPackGen.20190228214911_1551390679825_0.8733590162528941"},"_hasShrinkwrap":false},"1.0.5-nortissej.extensionPackGen.20190228220243":{"name":"@atomist/sdm-local","version":"1.0.5-nortissej.extensionPackGen.20190228220243","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.2.0-master.20190222012515","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190228133619","@atomist/sdm":"1.3.0-master.20190228140124","@atomist/sdm-core":"1.3.0-master.20190228150911","@atomist/slack-messages":"1.1.1-master.20190217194316","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"f74191cfc3376cf4cf2620c5c1fa1c843734b63b","_id":"@atomist/sdm-local@1.0.5-nortissej.extensionPackGen.20190228220243","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-eiizWo3MuxZjzkTq0AJQHbDfkbrSV2wosxZULwKmw7WBpYoBFdwYaiBCeBEVmkw4nhsuv3+rXZbHVa+ZycDeyg==","shasum":"0c4e44c55b28e7eb8f51cd4674d7598e288a2ae4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-nortissej.extensionPackGen.20190228220243.tgz","fileCount":357,"unpackedSize":1350721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceFskCRA9TVsSAnZWagAArFkQAJysPt9itbLof5WaSvIr\nKyYsRRX8qL3cER77A4m652C2bsBL6VG92cCgevKt1LuNg+PNWV2Z0zjgan9N\nC5IIQ9Zw0dautQTj8ZHBijZQyam00Hy7EZE9wKNb5+tj4wQXWIeaWktYl4tW\nN2Dka6F4BqOjf9lNKTBnP+hiUG6XY7mxlL66nopBN5gFKbl6QQiOECSLkjRp\n16GdVQB8n/N9eeK3CcPYJmL8QmZ9xEpYypg54bu1c+UeChii2GHltSre5Aep\nQfl0JeSqotH6C/W7zYe8PRzh1KhugwxDPM32AxZhS50JNRpobr79P30jwciC\ns0LTcnPDr1itoPCx0izHUaj/vYeskYQHJG+G1y1AG7s5HtF7Tp4+15Fklj+x\nRMqyfVsXSI1jqcqKDrMghR3fnMkU3MEtQJOFNHYbkRcsPJD6zAlBGXOlE67F\nUeuAKmGn7E8YAQ9jRdAt5204WDwjpRl0AK6UFwnz10RBY2gmqF06UzSzXBQU\nlqFE5tIBS1PV5aFr2iP8otFHlOvYu0t2TiqYGOZkZ17MFX8pXlyFXava+viq\ntOQ9jNMROlTZznS+4qvXxseA6of+XD5UmZaLylxHZv6ziHZ0Eqnn7UG3j6oq\nrvkvPSyD466Tq/KYKf7V4cJX6H1ACFEoYLA+AHxjpVf/Oh3fDSK75DrQKPWz\n7cuR\r\n=Cphx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtja62MUNoRZT9AMQnoILWYzktJIEPUXL5AnLnqckJ7AiEAyAttTZ3CFt9VbO1NyntDqxG6RQGaPWp/phT1n+QOO00="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-nortissej.extensionPackGen.20190228220243_1551391523580_0.7459334529318733"},"_hasShrinkwrap":false},"1.0.5-nortissej.ignoreFingerprints.20190228235405":{"name":"@atomist/sdm-local","version":"1.0.5-nortissej.ignoreFingerprints.20190228235405","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.2.0-master.20190222012515","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190228133619","@atomist/sdm":"1.3.0-master.20190228140124","@atomist/sdm-core":"1.3.0-master.20190228150911","@atomist/slack-messages":"1.1.1-master.20190217194316","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"63659d5d035b7fc85283dc695a4ad81f85cdb505","_id":"@atomist/sdm-local@1.0.5-nortissej.ignoreFingerprints.20190228235405","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-ogZx/7QDvNgztDJohToH2sfM8hXo7xE3/lT9LIycXYZo6jdMVFDcJiFTaAoXgFevRZ4SoORh2VgYiyiTXNQnEg==","shasum":"86738bd53a83df6544e76efba87cee2d1201c1a0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-nortissej.ignoreFingerprints.20190228235405.tgz","fileCount":357,"unpackedSize":1349967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceHUmCRA9TVsSAnZWagAA7IkP/iPB5Uf1op1ovxJ7Lb6K\nD93g9r25tkLl2OTC2b8t8p2xzYfbZ8bUptmvbBoORurDsA1C2jxwmOXvndI5\ncU7q5PBck7Ns6MCtuRnEsA8lmQg23ubNSC5ke94vm375eK7b1QpJlgporBlE\nCn0KaHwyM/yd2geQha607H/Y0gaXgLS0ZZTYL5IXB/QcX4GRiGJES1+lfMJ9\nvdnUM6FntXwJMNDwp9/ZJYqy6lfk7LBxZQxwAX272Q2RVR/vNTBPCnkbFytG\nKB1uolSKHfRT6IAA9wQvWESJ5VSw+6wuqQPMbA2OvDd3zRMK615+ogCTcivM\n/c1D/qPqC7FbNl2iyoQZ7MHmWoBSToKFJ30R9UExTD7mL4gm8atmScZc3acQ\num8Wgf9Z+G++/5wxvvyBPgAcF1ksMyQKXbOASHmkYMNsSbGh9tLFdJx7jxQG\nkjTAWblMe7h+kWCpH2KwXFuuYWjibaHjTsphhsbzg/wH6B0FnJrZhsyk0AyI\nIcLABHgAoL6lNnqnMHNwdfAI00wmjbQeVwaV7L0A4PZ0BamenTFguy25KQVx\n027k+kxMU01I1UcLiJ8Fs4mNhadWE7+pEyLJbPuNOGiJeeFy7bfcpNB773tJ\ncJwZ4yabYB9n1XEZ0m8Pgjch3ctN0QhQ03rofLTJWRr6H5617hm6lhUq+NjB\n+9Qc\r\n=62q0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBs6kHJZGF4tMNUtrTVQ2I9cuk/2ueIVRuHYCPYAeFDQIgU9g5bH0jQu2qnmj0ArMJnH1AGvIp5bZmaCGxl4KfFFc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-nortissej.ignoreFingerprints.20190228235405_1551398181472_0.804261120693295"},"_hasShrinkwrap":false},"1.0.5-master.20190301000954":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190301000954","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.2.0-master.20190222012515","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190228133619","@atomist/sdm":"1.3.0-master.20190228140124","@atomist/sdm-core":"1.3.0-master.20190228150911","@atomist/slack-messages":"1.1.1-master.20190217194316","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"569a08f662c6a54eb0e22dfd177fcda7c7cbe74e","_id":"@atomist/sdm-local@1.0.5-master.20190301000954","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-eyXfzkCFGn5hMgLCCKr5k8QZh2yuTsxyjAhob4UPouxbDXyrigyQJOm7LxtUVUF7neOlcygMXrvLHuvNEaY35w==","shasum":"1f88390876deb5b3f4f8b2031de24f8cca26eb11","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190301000954.tgz","fileCount":357,"unpackedSize":1349945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceHjjCRA9TVsSAnZWagAApsQP/28/W7wJm1z0E3Zdl1Hu\nldLiQtN/PAabb1szst+zmbws50EsJH+TNk8UWWenYwan4Z8aq5OxLjWPAH2V\nNSMANOvBGC81NRlLhlO/Sv25IHLSRNabjEUKE4lUAQVYlv7WCzciLpzL5gCI\nTa3dyfdn3Dv2neCyz0IlnJ01ezLVFYqTtmm11JKVIqSB1DzpnXaiJMHh9Z44\n7AwJCmPO9ioFx6Po2dgBrauzvp5J7FaEtAMe4FzQ9i85w9RhZkzAk0X92Y/p\n4z4NRU6bs5ZKWeHTw7zNCq6L5nr1y8UbvdBBTV8sILCuyKUlDHV+9+WryRL1\n3d6eXr3cl7lEUqFQZ8egq8YMcqqawYsaKTOQUdSM9KZJOhp3X/5CwKEBwKPc\njlKx8O1Y1HhJip7cH409wGRXIcaQdSeAHZc4XZ/ZzwisgQ1lRNmj9C7/7lbp\nDoAikKZhrQlUgzaeC6yjIQeDzH/Kz0WOLi5UpPtv8JE7CXNDSQXVttgRUPL7\nJvkvc9RFEF7o4WqEZHijA0+HQv2ANfIam+WLZhNeqfBWFa5czss6JTgLAAF3\ndkTJxU9HhaystFh8lvIDaX1I0TEZxpTSwzOhqrzuntEUYBJB1MAAQuTyx1JL\n7iynDu3wgLZO4R2NrErCUwGUY4IIm872Y3FB2IK6vOqwuvTlV7PvxM7hNkoU\ncPUh\r\n=BSOJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFsLL96LmwWhZbFnpJxlUMPLCoNxPfSzTX3m9xf8ZBPLAiBb7AoGHGxu5X1d9C8isydTEapqlSOb7xQS0zcEqLLXQA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190301000954_1551399139199_0.07923955083809653"},"_hasShrinkwrap":false},"1.0.5-master.20190312090158":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190312090158","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.2.0-master.20190222012515","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190312083947","@atomist/sdm":"1.3.0-master.20190311140443","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"1.1.1-master.20190217194316","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"3f8320dde9d888799847a89165a918b2c885b9d8","_id":"@atomist/sdm-local@1.0.5-master.20190312090158","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-tO0lkUqOECjiMMOPyV1/YVD1iCUhaUeoRMnt4OvaJmSKfdkDEqLdwoqSTe9HSDlQ+iS3pjJPC6xLk4fpYjS8/w==","shasum":"a0307cda8679c1a4ea070ee42a9ecd94b073cf86","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190312090158.tgz","fileCount":357,"unpackedSize":1350910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch3ZVCRA9TVsSAnZWagAAPnMP/iBlMLaNED4Hjt598JDE\n4KcKTgZ8qqre3LrbgQ4gSEsR3Gy2qbiuIX6xQTcPqc25ru6z69jq/eu0Vk2z\n8phdMkPQCmLZ5h5EABpovOo0bBT22/nwGo67i0YubZxjIkF8eQkNXjvu25oI\nuYqGciDS2XGFJDWq7ZfskLvumyu3aFKGF1AvHUZkxqcWtrqalAfrMjuRTFhx\ngVApgXto4Tn7p0Tva15/6Iyvs/2P/R71hbeLUeAI2vh4k6oDxEiY8KwwQQyq\nnroJcP44dXuW3iyvSPduDj5eAS72Vzyy/zX3QagfhncJRXxonEP0OFk3OLFd\nvGgZy/DdMjUZ1QT12w6cisquJ5FktEQhZpmyCI209f1OMqnS0uMeln2lVKHb\nbtIk1edjcmUCiufq8QWOM+ivqijr1aRAnVZGX1wCY9tquMxW01msWjSuXh58\nngj5bDRHh1zwRKEbuaLs+mLFo791DuaryTMTR1+9DBFY7PjDgfJwZK5OBt9u\nHRmUbJVnI18qOSkQP2Azpl6yg66LItTQPKkQAy6nIlCtngKF30Fm7Uhg1ss8\n2/JGKc9eXjBbJb5SmSDVqqyLlCo7BnsRyWNhQ3Nh1HKb/0scR5NurqWLprix\nobeCGZtlFJCYGdh8amzxo2aHh+XpcV3eDImcAz7NZQ01DVeXV48OK9dskioX\n/mY/\r\n=gjqn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHbFo3BRpCMm9ihDRdd7KYlNtsNfGYYTHb2j3xxokUrQIhAJlpjPdcpcCGANi1b5Y+WSvIzIYJtHjgMdaI2VL9fJP/"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190312090158_1552381524047_0.2319752166914424"},"_hasShrinkwrap":false},"1.0.5-master.20190312090614":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190312090614","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@atomist/microgrammar":"^1.2.0-master.20190222012515","@types/body-parser":"^1.17.0","@types/express":"^4.16.0","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.4","@types/inquirer":"0.0.43","@types/json-stringify-safe":"^5.0.0","@types/jssha":"2.0.0","@types/lodash":"^4.14.119","@types/marked":"^0.5.0","@types/node":"^10.12.3","@types/node-notifier":"0.0.28","@types/open":"0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.1","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.4","ansi.js":"0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^2.1.0","chalk":"^2.4.1","express":"^4.16.3","express-handlebars":"^3.0.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.0.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.10","marked":"^0.5.1","marked-terminal":"^3.0.0","on-new-line":"^1.0.0","portfinder":"^1.0.19","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.0.0","terminal-kit":"^1.26.4","yargs":"^12.0.1"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.0.1"},"devDependencies":{"@atomist/automation-client":"1.3.0-master.20190312083947","@atomist/sdm":"1.3.0-master.20190311140443","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"1.1.1-master.20190217194316","@types/mocha":"^5.2.5","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.15.0","espower-typescript":"^9.0.0","mocha":"^5.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.0","rimraf":"^2.6.2","supervisor":"^0.12.0","ts-node":"^7.0.1","tslint":"^5.12.0","typedoc":"^0.13.0","typescript":"^3.2.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"3f8320dde9d888799847a89165a918b2c885b9d8","_id":"@atomist/sdm-local@1.0.5-master.20190312090614","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-7ufEMZFPvBHhkKnscoTqYk4TxVTsWTxjxCjVs8EsC4vqq5ZwcDuxhO7xBXNtId/a7TdMZMrjyvznCoTi7Awkrg==","shasum":"1b9581c83abb104d629fd899494a00527cfc07af","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190312090614.tgz","fileCount":357,"unpackedSize":1350910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch3d6CRA9TVsSAnZWagAAc6wQAIbjuM4ZsiaSJZcNbLOs\nJtositqcaNnAYY02OsAyd3bxxfQUjaCSoPBWrADfOw3CqWXcpK7s8H3fO9Bf\nx9cFwCbJZx52Da64kd1ZlfugarMIY5d+C2UUgDzvOtLuN2qykHWW3ihOI9KC\nr8qX/4nOQkSXAx8zAaEubawwOYv2ypYlgd6PNRGGijHlHoH5J2wbvG7DB40K\nLYDPZHx8kOWgcSBOVXBsQBnr7FgDQcqpq8D3R1trofEMrEMj3gAMVTvcFcEH\ndqZuF3uUrbyn1C7Kt+8sLXlKFmMg1clyqxolapXy7W+Hwf40oE9/W77NdQxQ\n8Wl2K4WZbJ69/K59E+LmV+WHBTBvhKrz1v6J4mMvf5ypZQ2sB6kNheCeWgwT\nQvNAdxXCWBlERfESpVW2ivFrLRNkImTAyyzEQr3m6PB6irYuX+kP/tB+60yP\nvX56ciV+SqiqwYNJn9SM8AHQNoxJBUPDitkVqAzDqiz7+CCKhbhd5Qllz1R4\nfcqEyD01iq9Sk1Wusymnqfzrl8mvM/XraZvc8513K4fIPEn0kfmRZ0D0tRIC\nlxV1l4Plf9Hfx7qg8i2H+XV37gaPqzEWuGX0AkjDqH4Bja6dFARruBWmUtj7\nW7wRrc/Uj7oAfwRYfcrA96pqpXJkwc7NnOQRl+fPgq8SB65CcA1WJZhc7tbb\n9KM/\r\n=g6jg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYXYDG6osHCfyqDNEf7OYs8f7dtim3DMSLeR2kHOVKlAIhAISrpfbjfcqsXtH0jgnNSovjIw79GU9oX4S0/pGQclFX"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190312090614_1552381817350_0.11884167329049"},"_hasShrinkwrap":false},"1.0.5-master.20190314235921":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190314235921","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"1869a0e9ba40c81b3026af64d69dc83b4582bdfc","_id":"@atomist/sdm-local@1.0.5-master.20190314235921","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-8pGNJkEmd2wXdQYCYZWrQNjGkYcN0Vp/p1B9LfC6BleJBAi0XNECNQUe1LDBQjUTsDy+6SyCAryMUkuUUdlyWQ==","shasum":"2a3f7e21c9d17cc972118cab051a5762e52f5838","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190314235921.tgz","fileCount":357,"unpackedSize":1351043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciuthCRA9TVsSAnZWagAAfGEP/2u8kg2bjfTCS63fb+zk\nzg3y09CDP+ftLWgFAKbSnX+H85bEcGgiYYlN2BsZ7gQcnp+Vel0fB8E0CcZW\nJQ8eOhQqRUYrvf53w04jGf7rSgoGwzIiq3kUroa4ug4ak9DVWmIDl3cKz9LD\nDCTsVlcYPkY8WuhbzHkdWYT2kFqs8sg7nT8Cjb30DoLpO0CsWbNM/TVQSRc6\nkBaGgscuRaKboyxml17Vt78UUjvPKpsfmuqYm3UB3+SgDxyqT9CGeVA2z8Hb\nUdqP+OY+VqBT5IROsnlIqk+ijXluKBdu9iZCyU68q2tGDZ6L/w5KvLh/kjCI\n3yOx6qIMuExAEZESovO//W/b9kmOlstqy+6dxoj+rXA3FfW3v/WtY8BQc5AZ\nVXA/ZFRkIJNrZXeClOf0ZRAxklUTTzgORlZL8kP3ngm9PeXuoCL5Ho5ANB4m\nEClzzRgfvLAmzMqq6jsTFkspJRFWC+PXIyGE3vm8pG5iCHAB748zgx3Qogkw\nSf91Z0iLGTAKjfkSS8W8bUq0K3jq3aj2f2qIh5h7JZyhws2zbHoaaljZFowq\nqUMk5DXAM8HyvrtYPwxhv93Ka2sMCeKATYiY4UhPeT0Y5aXLgZsL6ayOjoqj\nXcmHzBEKZ7X4aIZN9oyMuQN4JGjyN7AUZqlqNYaVqfAoN4PYDcIRqI/lDorw\nbp+V\r\n=66Xv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDggTvoH3xeukvMAjQ8RqXJuISIxWWqeSVnrtk+AON25AIgChWSAOVHmab4105og5T6sK8ABrXSAJg2fVL32uPjDqQ="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190314235921_1552608096478_0.1189710217400406"},"_hasShrinkwrap":false},"1.0.5-master.20190315000709":{"name":"@atomist/sdm-local","version":"1.0.5-master.20190315000709","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"1687b8618f459afaf2dbb001d0b7cc7f72c88c01","_id":"@atomist/sdm-local@1.0.5-master.20190315000709","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-olN9NPJ3y3GTl86v5JK6phwf51EC2hFHbTnuPOmkHYnPB4LwLpoRb70nEvEZUCg6lCt9/bPJQUvj/yrx3pXLtA==","shasum":"a36bdd32dbc87d72b25bd2260ce94fee26cec759","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5-master.20190315000709.tgz","fileCount":357,"unpackedSize":1352504,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciu1vCRA9TVsSAnZWagAAXuQQAKJo4ns1eJZLHx+ah9Sr\nBW+YYTDot1DT6LnIPhYY+t7apSA5kI3nRzFmutzuZXD+IQAp/JY8Pov4L57X\nCqY3HmrmhgNCc+4b9SJCCo6mliiISi3pGjXEadW5X+W9fSN21LG4stP0gM1d\nuRLrKr7vSvZmKVSBLU0rZ7p6JvoknOEiPzw/ekv369Zfx8H1auErWua24YhW\ngqYmY+NT4yMt6G9V+VJ2O7vqvNDRCaU/mGVC3SZ4PoG6b1t3oxJ+IhPlqRT9\nYrLneptVYur5RT1lhmnBAeFI9LIYWzpYsgQSwbhCg9sWW3IsdUzPH26lZXy4\nkM6rBF7INWXXdq7Nrp/bJ6ETbmFOO9ST9FbwovsdwYw4Uxoc8a7UEOJvIiKC\nkGWLXMKElHOzEx3LrU8pwFNQ4q0xkkZ8cApjW3lQh2yrzAl5AuwomRHgpiUX\nr1goCC7+Qtb+vwPyZEUzvV+0Y8wmt28difInXNvzJOI33jmq/lvcjI2tMLo0\nXEbGfP8PViVx+gD09iLxMkmpnetMGWbAdXQL32Z8EvQLVYxPSZfmLuvBPmsw\n26JtToUY/NUTozTjYEZ8u/OcVPuSHqrbL4e0Sa9hb3asmHljXfrJb7U7tKys\nlAGB49PKdNngm5dumFE1u5Joa55Rx17odilmSrRoYmDIwkWUtbKFn6XNupPF\nU2fP\r\n=CRME\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbZg8N+lqZY/CYSzf6Ddp5ptHuyRcR0oaxTad3seCK/QIhAMgzmXEPmBzIIwQBMm+4IJdArIaMmBEKumHeq3ajF6qk"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5-master.20190315000709_1552608621722_0.45369296717806784"},"_hasShrinkwrap":false},"1.0.5":{"name":"@atomist/sdm-local","version":"1.0.5","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"fd2f57f2af27f8d6a4e81dd30000b95232317720","_id":"@atomist/sdm-local@1.0.5","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"atomist","email":"npm@atomist.com"},"dist":{"integrity":"sha512-AAT8EpbTrAVnsDSFnPDWScLUfhjwVn6vmD9W+BP+xSlsBO2ZQkgNLcZnl3E3gKPros8KmWc83OIko5EGgYAzzg==","shasum":"fa4a5b1e178c07e172a4da9e8249915ae3ffc8b9","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.5.tgz","fileCount":357,"unpackedSize":1352482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcivCWCRA9TVsSAnZWagAAO/EQAIc8+7NMY/8mxJW4UHxW\n//HlOV7iUUIeL8gEAKU6ZYUFGs6PpIGJ9sPAyT6ylJNBwFDaqFrASG4ZE8yK\niq4l+lZXTDCvfO5IilqwW/2UAnaqWeD7IlC7KsgFpvD6G1z22Q03GnJ5Mxey\n070xFqhqJz57qOh9xcub11kkuBrCV8iVnmq5fDdp9iln0zBCB/0/cPTX20QX\n4RLaW8tUhd2S6aU0TrFLzqilK11/ke/bKnyLsyPOMpFZdC/D+hUYjHtDRUnK\nYKD29EwI8LLLXIc8xSrIkfcGE8PEGcGBiXPTBpTLMaFIhgTAM/d6hEqWye6E\n6d6Nw/q6SBRGmPjJ+8oPiRgugWZV7jWQ9JsPQXwJ27w5zZ+sT01BZ+hu2GXK\nMP4WtfEvvBlNN8VgpNYOAGABCBXscepYiAdnHqyKRTDtCzRzmntUqiM5gLeu\npSOlzl9V5oBRT0yx7QdvKjMWRmrmvhv82jqNkzM8YgdmFSLk6CBAi3E3U+7m\n/GGfE1TfRbI9t0nCe1un07EsDZ0tAyU2wGLtUvTXrinxXBVc+GgHDnMR3VGt\nz8140herUS5cF3H+6XCw/DVmU2NQH/E6rIIjOGp9BLltkps+U9/OyZrrpowb\nuC79XD94NrK/xRgmhgHPdidhRJLCl9Lx9s9iqcAHMzTpMNuVe1USxGyg8mu8\n8oPa\r\n=LS2j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqigisRvKN6EKxuMioWKJUfRXqBQOHuXcsi7L4uFff/gIhANcs3aI4vwEewHw++yIx0uMZ/zJg/YkPeSxd8t7i9Doe"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.5_1552609429630_0.30920164740297995"},"_hasShrinkwrap":false},"1.0.6-nortissej.explain-target-owner.20190325195130":{"name":"@atomist/sdm-local","version":"1.0.6-nortissej.explain-target-owner.20190325195130","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"9b12fefcc26296f62ebb2b80c65f6537408b70ee","_id":"@atomist/sdm-local@1.0.6-nortissej.explain-target-owner.20190325195130","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-4d8pwvlTTwwhw49e/3ELRmgEkkqJyQJi08oK1/PZvwREM6C/0fdl7JyW1Aa1J1JROpb0hU8ew4QFlaO+nwPNxg==","shasum":"e2a767d978d35e269c929ed6ab037c6e52cd6b26","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-nortissej.explain-target-owner.20190325195130.tgz","fileCount":357,"unpackedSize":1353139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmTGxCRA9TVsSAnZWagAANecQAJhNEV5GKv2Tc7fokF5I\neVAhmG5HQJKSXAfi9uQr93ugxDxeIyNj4NHXTfOCCynfAKCOVtCvPShBdK+O\n6hiRxMWuGBnFk+hUGP7DKEmA6SG6DV7ECzBMJ8mTsTVyW95c6znJnbK88yTm\nGqsy9mrweAX7jYwTgWK3sKNUHMIF+4hLL05Do+1zWrA8zMZuhyU292eUMpMX\nUKstpdpdjDGVTWJClgrdrr+tQ4XdUi74Kt68UHeWUx6V3KCfNEgKGloQhMYI\nUNvja2yq38AEH7Ncd4HwiWnjKrQ4jRDJvME2IVcez35eLUsHtTIcSYhec6En\nNe7lZVSRuTSP3wL1VLWJGm91yG+U8JkN4JIwurCUkddCl0afZwbkZzSSGTBR\nPYB/9JiUZYCrTdgd7zbrf+Zez56IwLZo9YD+QrTwYNh0aQd3aHGZAKgCqoFO\n8A4Vv+/XAbs4fImvwvxkHPZE0I4yNO9OolStEfIUJmjIbBnnqDR577hlnUNu\nvoQzOxAox/YDXfCYFba5+TFoRaZ878WGvdDYffK5vp4mQ6LlZ1ojCODP2fue\nxvQ8StV68199q5h6nKxpseAYTJ7Ty1qRoaLvFj9oG/zce10pAaKqRTiJ2kiA\nIn/IBSI51VBQ3kG8vz6r4Dk6ticCBiDZqBlYta2eVHe4PMnpkkFBdPHlwdTB\nCUXG\r\n=zaDb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFzt/BN7SbKK3KX3LSjZbfKUazKapuwOH9BOei9bL39ZAiBDjTh+a3ZELTJ7mL1/DdfbrMCtrCgXhc3EFyOhaCknrA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-nortissej.explain-target-owner.20190325195130_1553543600599_0.20501699844100973"},"_hasShrinkwrap":false},"1.0.6-nortissej.instructions-after-create-sdm.20190325210513":{"name":"@atomist/sdm-local","version":"1.0.6-nortissej.instructions-after-create-sdm.20190325210513","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"9c87bc21b727e805141f4e5c68d9f6e319d7443c","_id":"@atomist/sdm-local@1.0.6-nortissej.instructions-after-create-sdm.20190325210513","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-H1VV2jdrBs3dygSdOkNjs6S2ZbwgCP6byYVW+5WMsh6gOWu8wkkWZbIuc0FEflnaHkWjlpJjjZxi/2ugNa6/bQ==","shasum":"8bf048a274c6243fdb2e595aeece56d70c85ba56","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-nortissej.instructions-after-create-sdm.20190325210513.tgz","fileCount":357,"unpackedSize":1353113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmUMzCRA9TVsSAnZWagAA430P/1gnGfOCO62M6SCrs0HW\nxnPvGoHHHaZ/m4zr8P+zK/lWPBulsQZge72eINLYumrp+7EmojRnlHfmPfn8\nf5eKMZuAHF78oAc6k0P1WHtgaX8JcAzKSN26G1bY9D0iiOL2xJOASUrT3qMg\nnKULBYOuOn7hQh0ECkNjjS2C5KuAzWWxevpDJSZYbFywA3NL60/11vTMCOMb\nss8btsQFd5KoM1P3iA5+JE3nPrpdm7sV/JqNzI6zsFv71GMIrODXb40hETW/\nFBJzpilPxqvmFzd8mpWfVgs4ddGyrAGN23sqraWfrtKw29EyOAUzcB+v5ISO\nUJnu6xjPp7LnivjohRaeD7yYwhLnW90qGJMllFGIJEv3zSVEUm+DkmPo+T45\nJK4sgVU4S/PTFrXGSe1L0+XqtON3lB31gCtomsjChZcNpEK3MsU4TiJwzCBw\nSJ9tuzk2PytxY0bV+Gj4Grbn4cCbbfN+4T4H1RsdYKM+Bv/48QPCgHCAQGff\nPsVieolDNU4obmbII5X3DJ72D5SPYhjbLulir75tDGptbSgyFe25WSum1YDf\nMd2/+pvtGMMJatvFs/OgBitK0Zc95/feudMnZuH2xfCPFLtwSTp9zxL2dLYS\nBIdELqEEIo36f4Di0Ss3pXG5eccaK+FIj7k/zyKFnCh1/2vugJ+3ki6xg34n\nCldc\r\n=3HM6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY4lVwzPd28KO5+nVt+JMXHQy6RsiuZO35UjWB1odoKAIgD+AIFaG1F8l6Rc/Y3TxcZj7b1F1wbnynqKxs6xSXXDg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-nortissej.instructions-after-create-sdm.20190325210513_1553548083261_0.10946652113735245"},"_hasShrinkwrap":false},"1.0.6-master.20190326042901":{"name":"@atomist/sdm-local","version":"1.0.6-master.20190326042901","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"152e0345adbabb2d15e4ced31e64bc24bbdbd025","_id":"@atomist/sdm-local@1.0.6-master.20190326042901","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-tg4BG/eMr6qfpOCSCfDM62WJa6IdpzI41qVbYAKBVsXqxLqhjKV4qHX7tZuJXFNNVGUwQhzQvJtzPr05Whb99g==","shasum":"56cfe6d110d67680afc8dc863b5c1700a12bd799","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-master.20190326042901.tgz","fileCount":357,"unpackedSize":1353247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmasGCRA9TVsSAnZWagAAkC4QAIAs/glrPqRIEY5d39gR\noezH7TnpSrkCneqHG6BWGiZ3qNPVqU3uzp0aXKpS44fVe85TluIa6q6ITgsq\nsrV8S0hmWIhvpfTzZH07XizdQldF28VBDlliS1UEYNRqwaObIl3uttJRgRLf\nvw/+vukR6jvs8SqYg/LapMkRleLLq4VRg1f/g1e/OJoKoguwEBYR7zGV+vDB\nh/O8a7d7Vlmx/YnAR1vsJaa2u4Guut9+DQEx/pJyRrmqW+Ar2zYAjuyijj66\n0qXF3dqeTtCVlYioQrsWvDpIEuh7tR/izhGpoFTi3esTd0awxb4ZtJU33VV6\nBYtHFTxoC/V8ga+EkJS+yV2X4yeYRJ5bsdU6DG+G+RmMaTyUf7gs98idJdg+\n8HbLXTNAa31g9WE8aJOkX3ajojogsXvtBhSUPdc4r1lSMl94Jhz4SnIviX1P\nC2d8Hwn4KzHYMaQ/cqMZSxt8FHLmuFAz1fMPXYtUIRUEg40FKLkQWiOq/kFx\ndn/Kj+83aEMkAkJGkfQ737BIaiRBuv35s9n7AP+hc1h/QqpcbjCZCVj8q2nD\naQUuwcwvJZUkcAG171B0xLmel9TaYYIs/Btb4FvMuKJR4qL4Ek/Ig93KUygW\nHG8JxRbV2PV5Z66H3DfynhM1Fnwze41X3m6vDkazK2A60kP7mCg/TySvT3qp\nQ10X\r\n=8zs8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClA2y7uPymJd0w0I3mPAmelotRmkJOqhuJqWgv0F5eRAIgbsMJYTOJTUpLUcS21Q9TEVY6+FvujAvelyySb/uslj8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-master.20190326042901_1553574661681_0.8221360844847727"},"_hasShrinkwrap":false},"1.0.6-master.20190327194706":{"name":"@atomist/sdm-local","version":"1.0.6-master.20190327194706","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"31e4fcf7593b3ea72ca392abc0f1fa6b1180a7ef","_id":"@atomist/sdm-local@1.0.6-master.20190327194706","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-bgCNbzA19J2EcMsQu8pb1v5lb43zAsJGhKIfakBswEF4esdV2VjzzFV0yxx6pjwTU3YXuGiCEoxzYv1Qj+wamA==","shasum":"ef626d1276b76409f26616cbe60d624d1bf49136","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-master.20190327194706.tgz","fileCount":357,"unpackedSize":1353738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcm9QpCRA9TVsSAnZWagAANT0P/jumnmTCkH4GHqFEtTFI\nFMx2rTtZyJeSTCMsozfuBOt3w0ZPlpyQpTQSvZLxlKZguUW4Rjbe88/1AIrI\nAcM1PRLf0VaH8qQc70QO/olIT2oXUCklXAg3bhra7HRBvmy2XGmFCXSgHbTd\nRcne4Mg7iyU58et6RKmMnO08Kv3Yozjd2WdYCm838Lpd/pozs0pTCOvdzoBd\nX/oO8wdlJPnPHNSEbsUADReGcx7jX+HB5ZL1YKBR2KwyxGfVo9j91mqxn3ub\njwInQOSygmh6KO0FX77KfcRINLMw9qsy+vuCwj6zXmkhaJ+l0pHJrR5FyCb2\nbBtLsaqwR759Xr3zFUvQSbTsYqovx0W0c7Pt556gQSNE/BjKrUS2bPYKBDe8\naMU7sfN2OYN+UmG5zhdYl+IG7crJvlLtIbsXLojMBMxqqxbgh1jKImdoTFPs\n9szx7SAZ7RJq0uKEISPPLSBsFkhYmnez45gTOI1oEdIoNhzFBUXLa4bOtFAi\nt1MYy0pxKy7xBlXsIn+7PALT/bwYgxVItmWnDWEiLvPZ5PnX4Qnpz+lsiCv6\njJlXvOeLn8HObWEnlcWaRVTniKbAOdRohyboIrCerr2wV9Ypz1bpIFTtHinb\n2V/oCrDbatDpRNXWz3+n+8JWoIBAD8fnG3GrJXPqWje3SPDW7EqHbeK6LPXv\nemNz\r\n=XXsT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICjqQiTHADUTOTTRoBdbDytHcIhxUyZlrJ5jrIcYKRBAAiAKDOYDlcmP50Pp6FtvFKi7DxJvY4LVCH5fDlaMwoSnNw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-master.20190327194706_1553716264644_0.9799563392586912"},"_hasShrinkwrap":false},"1.0.6-suppress-feed-suggestion.20190408021352":{"name":"@atomist/sdm-local","version":"1.0.6-suppress-feed-suggestion.20190408021352","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"0dd1d32b8c093437ad09a55a9d745eda25e31ee3","_id":"@atomist/sdm-local@1.0.6-suppress-feed-suggestion.20190408021352","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-9hFAX0PAbPzxLg3qALCHsICuO/iGeQ6BwD9sDK9ZEQCFQAWXhV63ZneI2S2NBBUBXHCyk62BJQ5p+/qjXCyGiA==","shasum":"17917b380bbf70c1a695afd70862c29096118c8a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-suppress-feed-suggestion.20190408021352.tgz","fileCount":357,"unpackedSize":1353868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqq6pCRA9TVsSAnZWagAA7kIP/3FekT6B9ff8h6fBdXvv\n5Rk+khkgA2YZdRQ8pnEWoFTQgtyaq0z9R2FwgFHKbtpRzYPOm9IxVlfwF75Z\nUdGd+VXessBlpXDAcsAjWiIJ47oGHPQRbpQvjqhnmgqQnXIiuHfPRD4G6DeS\nR0H9+b8Z8BdS77V7oq87k1Vi1HsW6fYiVBvnqGwevqIs9uj3YyPNGJvqgN46\nUuOKD8CdKtohJnjLo+B97p30dFzR6YUvRIZFsYUCXHgWMDPUkpZ7G2AmweZf\n+Ov3rxjcpAEfBCyi7vlsmCwfSVN1pKRBxhHKJ5CvcevKBzq+hnqRyJkUxBOG\n5JTM7DsNqfW4AvNiy3CHmO+/t4F6EmzEOmzPeOxynJnxKwAgD7sHqHFdeJst\niiVPt7PM2IxbLUCgZ1Um3ot81VZoaY6dTts4/cuaiLYD2CFGR1XsvBbwLGia\ncQTPdN4tMokT50nmsP3LdggDpEGx8HmRyZ18Q4SovUIl1346IfkwC7XGvaR+\njvU4NcSYFz2Vv9dmnkSmC+sfd3nb3zBumumcM1Qlsll4v3uPnODlT5oJtK6d\ni+wvqsZ9siwvdmYWRVDQbbsvZ7T3yqBPeOJOw7903g+7TsGBP3RssNbTBBAa\nyBj9n7q/4KlNRQsppKJOFwskqC1C0GZZ6JfsFUmTG7ReazM5jr/AUaujJIoU\nZb8B\r\n=BJga\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNsn8ZkRA2R9/MVIndbbbU+uJvU9AsDfqsYDeGYnaHTwIgWbP3NYgbXeyZmkMRoVmSVdR6v7ylget/LQYaTMZGw1k="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-suppress-feed-suggestion.20190408021352_1554689704463_0.35086504489425185"},"_hasShrinkwrap":false},"1.0.6-suggest-feed-less.20190408024618":{"name":"@atomist/sdm-local","version":"1.0.6-suggest-feed-less.20190408024618","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"1087a96aab67f0d0b470dafac2fbbd2db27bbde0","_id":"@atomist/sdm-local@1.0.6-suggest-feed-less.20190408024618","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-yVsU3AlNgInIPwCtIGsbzTF2RhV9YBjr0Q0blEbzkfezyaJlWBLmFGnLWI+Hd+m6cXtwJVZ43485599c9D+Vew==","shasum":"7611aac7aa867f300bbea323bc3438ed4c4e8886","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-suggest-feed-less.20190408024618.tgz","fileCount":357,"unpackedSize":1353955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqrZNCRA9TVsSAnZWagAAagQP/0BGEuqTHLan5V12RJb9\n1uMM8hRCX8+7nmwJ+guPf0k/7bOXTS/7z/v0o82WKmZY4Zk2aIBpGtBW+gVR\n/AA/8ZhfXROfpw40AlO9cEcC8H6xVgcSqDf5HhNSuww7bK1CYt0BD/Je3gtX\nlH05jXtWb8JTJyzsuquJLonVM2nMJi7Qh7JE18MaTqXyaMlV/Paof/nGPGFT\nE8dNSPk6zIak6m+dRgF5pKMWTCG+RuNK2TeDF7SWQFLYzXL7kRLbQfGXsj3V\nkK5+tmXCWsiZ2qJx02g4yRDwQ/M7wNQkends53LOiumXAAnhEHRCJ4EYb7g8\nu++iglbpz5dWtwhlDvyrXMz4IMx2aoUSDkmgvimKVaehCi4uow2X0D0Qu2uU\nn3Hq97iXMpYKud7fUa7HAVOV8XTw8Gud/CWR6nHl7gJhr/UnyRL3MeWKr6iH\nrJf/pqD+P+9KuUa1ZIXKrcXncntUMstwyZ2PQQThF45hA+ghlodCTm4IWRlz\nutq+5T4jqDHo+FbUAIGnwq9SvUjGEiZogljU5qgC8+Eqyz+Q4IMNU9Klx58n\nadKP24NQZyd9nd5Qfr5aEAg0fBM+abWPidaWYzuPR/i7aHbZSYpbCwmCw6a6\nx/bwYU/0yIq8stQtX3iDjeLjv8yz5pkw1mfLI6SdBzi4v7oYhAEpudHlnMb4\nNiJ+\r\n=P91F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADvao7SW9VcqXc+g4GhHZOZhuFLvcV2YYaZkHcZIgP1AiBMF0elfNcZVRjnZx70OdNbU3amn55u7JAFIo0jx01BRw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-suggest-feed-less.20190408024618_1554691661026_0.8302994824456869"},"_hasShrinkwrap":false},"1.0.6-master.20190408062103":{"name":"@atomist/sdm-local","version":"1.0.6-master.20190408062103","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"95ff79be6d2f037f4f5ab1ded46c2cf648966e43","_id":"@atomist/sdm-local@1.0.6-master.20190408062103","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-eSyoTMHSLBjQuAImIoHBDn89uyqIFrPALBaMO9hWEfPK8I/qZxAoZKlY5uGf4Y9F6BW9+I3ZxD4SO75wHmHT2g==","shasum":"258109b8f00fcaff43dfbf4423e3c7bf1cbb33f3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-master.20190408062103.tgz","fileCount":357,"unpackedSize":1354044,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcquinCRA9TVsSAnZWagAAfHkP/jCFMD2KADaV82CXKRsL\n/TVVzwsD8VY6vyaAq7M+4V0VRLq/c94wYAiNNLAsHvOKxn9f0JqFIfWugkaA\nVDFoCHeVGXEVvQDfP5ZEW32tLj/TFtaqw9BTBUOtOKO1BMNieqrElnxAztTO\nEGEze8z2FrSUQTqNzuggVarT+um0SXGe2yC/u06fTo8RBDxkd3ObA+X/8ufW\nfIlECwQlHUAiTiVFxgTm6PSeull008Sed3Thp4txe2aKKjouT5M3Jqq+gWP7\niOFftlF50c0x11AOlATgeVcpV6VMEb+yY3MK0/e5ObEy7qdYu/HRmHcpsCSX\nS36qikk1T5Hh5SK/922qe8hcqCBdFgA9IKjT384q+q6uDewrsp/phZKRiyp/\ndrP2125TxClXpdxeOTi7hvwpMN/xsw0SamL6XmpXhlcBl7uPvQDj2MXw6mrb\ncEnQhhH6/HHR9p+oW4PeNpnoik1wj8JS+PWpqdDV9Q4QiM35kwwnzRwIZsVy\noU0qFM36IRFbIhPiK+MxVGsNPaHsobt6GKpnt2bMqc1qgOYDUb/ONkL8XGtQ\nIXXYzNZvVCJR0/j0J+tjLKU/9h+Vh7MhY7UihM/pSi+5o+RyEMYASqGv5Hn4\ntsyJhs9GUB4RkkiCKJDFSMvV6zQtKAJhOs6taxIxTaBp1lrTQiXS8SlYeCtM\nPxjH\r\n=RQYx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDH56uXJz/E2OKXmQIa8pmU/71Q5PxbAwLS/Zek/sBX6AIhALU0VABdE72pnszlQrhqbmBFC4lhBEW+ph7laZz84jua"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-master.20190408062103_1554704550655_0.19950955542879245"},"_hasShrinkwrap":false},"1.0.6-nortissej.remove-channel-message.20190412235021":{"name":"@atomist/sdm-local","version":"1.0.6-nortissej.remove-channel-message.20190412235021","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.3.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.3.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.3.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"1.3.0-master.20190301203019","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"71290800faef231d4e70b02c293928946e658625","_id":"@atomist/sdm-local@1.0.6-nortissej.remove-channel-message.20190412235021","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-YRVsKc+PBj/Pc9IYNkqHquaqjBI48CH/xwutY/1XDfNypH842/ILrJJ1Wr2FXvoSMaH3WKudwsjA8M+qFwSo1Q==","shasum":"100d0f69da12076497a084acffc075db03f22470","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-nortissej.remove-channel-message.20190412235021.tgz","fileCount":357,"unpackedSize":1353911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsSSRCRA9TVsSAnZWagAAXDkP/1YM0caSKyP0WMS3fTfM\nuQoHSYeWc/vAYSwBkgmvqp3UC/TyjI6TuLbTEeRj8y8uSgK0PuCVOQft217K\nKX6wpvmBt0323/ZvL5A8Z1lXcPpXZTvYe0x8WmPJ9GH15Bq08jQP/T1JZZbT\n2wXM4OHiv5Tr6xRW2emhwuE35hVZjc41v+5a0McENSuDvw2y+fm23B7/bhyH\naCkNo2dhblmeXD+aU6MtKstOJOvmH+rg3lY3whA65XqPa4w2dFYH82mglO4x\n6i4QSaplWyEHh3Q+vyG4khfMaSHb8WWRPuYuS1G52cMJ9r8owkIWhOC+3TPI\nKduxNGmDrsqE/2oy0WNtCEi6ppTsJaJ4NqzzWWkHraEsmjH2NKQ4h1hqW9N5\n0jnrX4ALl8mDqdAKLTLBqSPjexSOpWX+uFMJ2nEx59C4/YdTGAwBpDYjS6ES\n1xSDTgQW7YG+x51fhB/y0012eZJxit6eT/FC2dYVfAn3wWxFuJXlQ8iGFN6i\n2Xi68mwHjhhMJDQyjC+ESP2aZIaheVpGTAXAFsIoHVYUB0uTXjSydnYDUplY\nj7vbJqnCVeEyRzzNK95CGYo1ILh6Ef97NpPbJ4G4TQXJfabeAc+JTJL4XppY\n9eGHmm4tveFtE77hogQQiz5A+9YinCNKzn9K5yC6j1pTxKOL/0VRdltykL7M\nKaMm\r\n=VjZO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFbifw4YpXgiPcNJMRefW/jTiJQXb6DsGcC/L0F9NhKVAiA1s5n7XKuZ/yVFgJAP8AKHfXvS33/jXs9yFUrW/i4FjA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-nortissej.remove-channel-message.20190412235021_1555113104939_0.5348200476295188"},"_hasShrinkwrap":false},"1.0.6-local-remote-repo-ref-252.20190415205529":{"name":"@atomist/sdm-local","version":"1.0.6-local-remote-repo-ref-252.20190415205529","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"034e64de0dd67e290c46a074f4b7f247df3e39a2","_id":"@atomist/sdm-local@1.0.6-local-remote-repo-ref-252.20190415205529","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-kQVfdnAXZ8kCWboY1Ttu+Kllg7jNNUGL2Y599KFcV8ItqpnF/8CsG+McStdpWoAL42TU29S8+tNSSuyiV4bXoA==","shasum":"8580cb23f8b02c36cbb7b1fcfcc6c64d77a24b03","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-local-remote-repo-ref-252.20190415205529.tgz","fileCount":357,"unpackedSize":1353355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctPAoCRA9TVsSAnZWagAA+UwQAImEEs7OD1ti7q/uW2BB\n98Zat+OOeNc+1urY8zqmZ36LmPyJp76WvdWFS4EgvbBqXlcfdkC3PCj54cQI\neOFKh/2J2CxLsggruGfMr8ye2LcXgTwcFy+wzv8gxs+ghDG9TDJSjV3LT6op\nrm7B/ZA4D55Xg30jD/vdOyXf13UqcqLZdst2uUHjR9aG/wjQQ7Q/+hXvlabf\nEa+9oVgpug5YY0UTRQ0+nk51vr9ixPGEKKOd2IjDXYejOw30A09l7vm3IrD3\n1y4uXgpEAZFSbLgk21//LGPWSpJYEDdWmGWkDBgjZUZ6OGkDdyPG+wcVxBEf\nnK2TDbU9/EUucG+t4vO0YMxYW9eSMfTYZLS3hE2ODi691K+IrIrj/Li0Hilv\ntnUcW8JcIzCzkquT3ePECaovoxoUbcFl/8QU/XSi31NioJoBUD/xAPgMirGV\n1L2M2t/woMsDqtZG0A2WRuowHHhaItlyR+7Z3XGen/mSCOt04X61Cj1wHSWW\nKktAqV3+jUs0NvC5zye0g/WdatZmCBERFk06MVwbztH/lNheTIAuC/CjoxTo\nrxd78wzkI+qGIEAtI5OIpLJJK6G/1/9AneRK8TVVdA2CE71qdBc7MRPalbSk\nu3Blfo4WdqOtTi78WFQSle9rqQiknc7DAc26M6wt/9RAEWVgYw0zdeNbZuln\noi7o\r\n=9lGo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiP+/wQeMtU3AO7Xk8LWszeyAjyihzJY9xO5l/zbTP3AIhAICBhU67R/edSEm+XRd0ggeQAuIPDbc/TQdPNmnJRheX"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-local-remote-repo-ref-252.20190415205529_1555361831206_0.03151486622226107"},"_hasShrinkwrap":false},"1.0.6-local-remote-repo-ref-252.20190415210108":{"name":"@atomist/sdm-local","version":"1.0.6-local-remote-repo-ref-252.20190415210108","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"b3fbadb77572d886706ef4a2f4397190961cccfb","_id":"@atomist/sdm-local@1.0.6-local-remote-repo-ref-252.20190415210108","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-vrrnnBYiVhhUzblvGPPQz+jBjCA4vhG7AyoGYcbBkWTY4AmKJ9YAL9H/FrnGwUzUb4t60PcpOJmlH/jd9vD8mQ==","shasum":"a3ad1c961cb01ca5eae990430a2df2f24ca5e58a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-local-remote-repo-ref-252.20190415210108.tgz","fileCount":357,"unpackedSize":1353355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctPFuCRA9TVsSAnZWagAAEbwP/RYjLTbAyh5OOykRrfBC\nyEAehAlO02P6BXxgStRgyFw2crx8VSv0JxIcU3ZllhIXaJLhdRGcThUvjh0C\n5+Ju6hu3MfQ/CmVZC4o/M+MsshOze3NuzFn7iPbt/hTT16TN+WnLx5RGSAa3\n+iW1J1GFJyhDlI/GhyN3mQBEALX4PlPqD3ttMGpLnXUFbfiu0sUv0JJzwji1\n7z2MKdgkNJLutnbxkzwmrngop/3lP4DQFVUN18R19LZdUESiTaaAaYgOVUiS\nbW49iNqsjCozjQ19aps4RmSSJ1B7/iMecofgjqrKTRljIP32QRJIGK7KXMfl\nWsK/ILSlMqyhIVP04FQ2AkKseFwaMfQcb851xNUy/eflrb8MYuQG0OC92qqh\niuVJR1vXWSgrzZn1xGPn3Iv6yCsH9uOcrY39p/6xfmbLMr1kWqQxxFL8ipqg\n9da9WpFkjT02iD4EWQbdb8K0wDD5c8y4DxWD7W93DO4Sz/I2zhvPGw3a0L/3\nMKRO6XCAlJux+2tnYfhBskP7vqxpO/CeC9YissJQWDfJOzxLwk0vcNRclEZg\nWCnkm/UkId7RiI8B3Wtb/17YB5H5Db3loc28yjCWtevNKr8d/pkmoSHOht7o\n1gAbwnWWIJiktKEUXf2Clev81CSxW0JFr1ObIvaljGUqBsXztE7b4F99yIpC\n3hVF\r\n=Frp0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeLm82Be+PYV/ahyP+9RkjSWEo+bosMP8DFGrgc8Uc8gIgEUR/OCf3qGdpwPCRCrCnc33vWCqfTyPeWar+5ltkYv8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-local-remote-repo-ref-252.20190415210108_1555362157849_0.36499470065727935"},"_hasShrinkwrap":false},"1.0.6-master.20190416120446":{"name":"@atomist/sdm-local","version":"1.0.6-master.20190416120446","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"914a1af09be5a2af758ff47b0b9ebafb23722a10","_id":"@atomist/sdm-local@1.0.6-master.20190416120446","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-IWqfsGgfv3JDICZ4paueRpYm0CTROYDLp2+fHEKOakLNfzF5LfmZVL77pbaDCey+gekLfVlcA+NV9pGRyDPHCw==","shasum":"116da3473cea111ec01323fb4b77c501d2aca3eb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-master.20190416120446.tgz","fileCount":357,"unpackedSize":1353596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctcVJCRA9TVsSAnZWagAAXeQP/0HU/G42oEcA7uco5/3n\n5i/9Frossdd2LEgKt33CSHhEKQUN+ihEVLELD1unRrtoFNZxA2mkZYntqrFu\n1+XbsNCaUF1wZuKHOjRDusJ49uvb2Df8Gtr0NbQU1or7gvBf+fH6+AN78PO3\nbucgq+2l7Mn33GwITqamPk0rDjtb5CpYageLUcEB/0NPlHusjPU6mxEa3RSb\n1RIGnSZeDjcxYvl71qNYXisBR69wYQg4ZNck/Oz1ZRrdcF4l8J9jcAXJtPk9\nujsWcOqgWxgwJL+ZhPv1I/RtH/uh5FZvesi6qMw7sFTMqHFwH6NGn26qNECD\nFAWH2cglCD+zwOU6MqBc32kOBaZAKesYNqvIkZDc41MT89euXPzSg6LPmGdN\nazZ6ZYICVQlrqd9LS+LIB1LhtHRaFQlSs/CpQ4QTc90mYAMciLsEtNxCy97D\ndJmBTVcOqhlT3jB/Iv2xl/50tnRIEetMLXfNLtMohASFwTbupxYTuS0gMbsk\nIaNq8hc+A0yTAijE0r880C2zO/tH2gtcBt6doHp/5Z8+dEU557mzIbtvg/A9\nvau9bhKIeMU/Zdt32QZmLNk5HNHvmEq6WwXRQdDuC1O/dgOIaI1WRImmB5ti\nR/mVHbgW/CErT+sm5qKY9IpWRVnx8B/kM7BF+fT/GRyJ37FPceffUmeHsvxu\nG98Z\r\n=a9jV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHc6a1zDdGE6y8BrwjMlh6o8JyXxXoS+tY7J82LrbaYjAiBGlgxwe4gU7WmcrBP7Y1Cqiad0R3UeW43goIS5ZoCDSw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-master.20190416120446_1555416392376_0.9664373778009847"},"_hasShrinkwrap":false},"1.0.6-master.20190416120625":{"name":"@atomist/sdm-local","version":"1.0.6-master.20190416120625","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"914a1af09be5a2af758ff47b0b9ebafb23722a10","_id":"@atomist/sdm-local@1.0.6-master.20190416120625","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-2dkqiqKSai2inIXCYe/zkdwBi10xzBOEJTCsUNXhwZhEDCmZJS0wuli+7bBlhGc8Z8asRZj+x6JTiphoV6/KZQ==","shasum":"6198e266c03cdab54298e8962cd0098682144a1f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6-master.20190416120625.tgz","fileCount":357,"unpackedSize":1353596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctcWbCRA9TVsSAnZWagAATwEQAKRkOXsbo/GvChVsj4Ot\nZhwPQru/JN0JgKSV3Z2BEPHfHACoIrGWrpHDBtySff2DwSyYqLMS16CWxCP5\nS9v5Az+p4cPI+bfmFgPGs2hKFUUL3aTSVp2eKRbZIBF5OYOcYVPO9lsm7mh/\ncHlFhNrIo9A3HSs6OZzGdsFwIv7xF0KUWiLHeUEGJWeZ1jAWUGF/UXBBXZZg\n+bYx31U1NZnUJ4tYewlUrzG2ojREUYfNtHDFjg1fVmZmNJ/euZoK75jfgjth\nBOrddUvNnJdKkKLvXF0W9suHTzP43bP//yN2DuRzrI912g9d35WMKwh6nYFT\nJBp/l0Kg2xz7rpKFkCqxvXacuCdj/XMpv2BRsIURWlgzPWqpHFtLoOAcs8IO\n4mgBfyPv2QfpJjh5UVsMc2j8/pEpZfKGtctTpqZBlpbf6FsYrXEEBmfpAzzK\nyL+dgKquul356fq5MpMvjqiKP11dikzYblmS4mqtPxXW/96zbYS5J16pvTJw\nf/MnN7bJPHm3gfuIUNi9O7KnYjAsCkZAhy5KJSqIAhBOQUMp2byU/1j3v9bi\nhmif0jJOaQXIp6FYplh2vWTdNIpClJbbqK0uklDgtPhu5f2VmWFwidxxKLjc\nAKWMdr5ezcYnKnTWze7bmVujdT+tT5qaYZBXtzjHhfiaXiLe3Fbyc5ySyOPe\nGKKi\r\n=CbE/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDepsjQ7Hd2BOnfwSUjhvF/MI0tC0vSAajx4QcXJZ6CqQIgORAPc89VouOb8aU60che85Hq1e41mnqeWN3h0W52weM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6-master.20190416120625_1555416475083_0.31551932323895593"},"_hasShrinkwrap":false},"1.0.6":{"name":"@atomist/sdm-local","version":"1.0.6","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"ae0e0be690c40848ecd46a24acb1816ef768cd9d","_id":"@atomist/sdm-local@1.0.6","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Gfb0q+3snjAx/nweOBG6hsaenVJyXBOqYtmD9eoyQrk0CLxAsuPQuFhJAKVVQCZJPoQ3uLm3JzjG/hXqrLkJZw==","shasum":"8e6e0d6caf39d5a47f60e0b8b5399c0d05a67f38","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.6.tgz","fileCount":357,"unpackedSize":1353574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctcj5CRA9TVsSAnZWagAASlIP/3xY0rDwOJkg7a/w8YYi\niPc9+J08+JRzpQ4771Dxr7sYfeAEVoUspsIxtbBuUWJbyZr2uhHiD4W18Ua5\nZGnKTnFX+CkZ/x+ziMetXJRjrt98D47Y1Ma5t/qyH9U20l3b4NeoAB7XzOE3\n4ZEzaFWlkZLkJDYnFMgRHZ6Vf8qq7vCloAreBaAgpiZEFwFSuQks2PUo5/sJ\n3oHQISEsy4zIxW5w+140VgG5Qqc7/E63ClCVvgHoyqLxc06PTmH4MqLtUPam\nRiBcQu7lSEGJbCbQsOKrgi41B4krMiqqH1qxGkpwTUv7fF8UeUDwO9CD9B0g\nvkMXu0A5XZytxFWSkWrmfdINuwasEt3xt0gw8S50/GR1q6Ts/F8Q7FVpm1ww\nO9fJbc2bKQfRm8vfDtrWG2Vs3KHJlHt372i2CqFOem0YpDTYDLmfnRdMbqXC\n0UZeLBLJ9FsjGYE9qaTXPUMxfiZGxNHpj1SvYNveZBNDsEsgW7/3BrDPPo8C\na+SVN5soZg+O83hMWVMsZHTR4m0OeMNE8IBk7CCa/yovuDQ8n2FJg8mVg7gZ\nOeSa54tXmgatBRBYC+HtpNfcrpvqC0NmMtiZ/Wv/l7yBgJWc1LlqclhK+GvY\nV6CvErxdTMH0OXSIt/xAPHCJ2iiFutU14WyxEk+bBe4QA3EkMiVViGa0wOQg\n/ifD\r\n=NWFW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICVIGiyFV/anvuWBUws2GQcp76jfzI/Ex/JrdH2udbhuAiBhoGDlifL9Y0jccv1vN6EoEeOgYz5Ap8ypG+CjKj70Ig=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.6_1555417337156_0.05267881362951088"},"_hasShrinkwrap":false},"1.0.7-master.20190417085029":{"name":"@atomist/sdm-local","version":"1.0.7-master.20190417085029","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"ca73290232f36c30579d67eccdd423ed5c22d269","_id":"@atomist/sdm-local@1.0.7-master.20190417085029","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-LsRdLilCCl8ZhB4CE1u+9v3pmylnrKSMaOFo2Kz4pIf9H5Nr9BoNFS/SdudEqsQBZ2fdQL8VaUhse0x32EiSCw==","shasum":"c29ca5c316767886fefeb59d51ea60d756c61e49","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-master.20190417085029.tgz","fileCount":357,"unpackedSize":1229503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctulMCRA9TVsSAnZWagAAmQoP/ih+fbpM6wO3s1sQvN2a\n1ev7ab2QrjbzAvg39vB4O1Aj6M+lyruGeY4L0VPTO2t5Uxjl3+5Gb/GRtPR6\nFn3YieDtY0yGEEgbVNFLO6n24P45AwNkARif2QgKxp92sviXYYL0T1sA5DQh\ng+cvKPJTsbepg1T+XQHtZh/W65tmBpy5nN1pVKXw4HgT6QBUUqMMnC890reA\n9OIzVTy8XoGs9cCKggyVCWRTvHAxgUNoZ6bm0CMWcuo8dtn1uunmpUAmWCvu\nLMomoSj4u2RBq/xhIv6Afv6HKAAUx/3tsfIjpl/SxVmg38Ybh/KEu/IpcinI\nLRQC2u7M4csfM+43zNeAaz9NPFKyz+C/m/QtwYMe/vTA1HJB28u3N5fUR74R\nVsSoLgvd6e3GBsgLM14qOXMm89EEvWM4UYvMKFh1nEqG6IzlhryHknALjwUN\nfucwbWGAZufyG639iZxpEfYV70VGUozCenV4oeZx1m7m4PInfooAboePj3Bb\nAJUhCuLjn334bprZn87TWXHVFpkqS6uN/E/sYs01cyEzGrostojv/3H+s/qO\nre7j5+N7SKkIU9s14LhkE5iqV8r7nDKTfy9RsFqLvvz2bVegT8dR1bwJs7qx\nqsvzJaj2EbtleRsh4xENumIg6dmWzCycQ5pQG4E152QhcqC4sfHmdFCQFKPh\nKlHP\r\n=tf6Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHt7DAmNP1Q8QuFgWS8i3DLRMuFPPOl90H1++lj3oi0JAiANT0MuOvQKXS9nn5lGKG7UrzpGPHEJKVmxsoMaK07qbw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-master.20190417085029_1555491147696_0.9313657398575634"},"_hasShrinkwrap":false},"1.0.7-master.20190417085112":{"name":"@atomist/sdm-local","version":"1.0.7-master.20190417085112","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/open":"^0.0.29","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"ca73290232f36c30579d67eccdd423ed5c22d269","_id":"@atomist/sdm-local@1.0.7-master.20190417085112","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-oCs1obWFfMdbED7RyVfBhddh0R29EYK1doD+CFWdk8IKUHBE9/j7QPxvvTGDp0bYhXWfhKZZ7qRx+Kaa8AKkbg==","shasum":"56dd79f9f90c62d43b0830d1dcda9b06200cebd0","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-master.20190417085112.tgz","fileCount":357,"unpackedSize":1229503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctulXCRA9TVsSAnZWagAAiVsP/3tRT+ox7p0CKQ3TbJ1p\ntvyNt/rPTjhTX1p4VchCegSIoz/ARmE+bwhWF/hB5/ZGpBiUAaVILieh1kb/\n4uJGW/kyylef2MBdLa02jO/fgHt5OOwDJFyvIj3FSHSWdGXHJFl6lQ+eVBc+\n4GTEmHyj6Os56oTU/OB5Ug3Hn3EDRmjWAHSdVf33zdqmHvVh+w+7uP9KB7em\nsJaBbmP8CzrLcKxAqgmtze8/KnESza8NsyBR9uLkMTTP+5ThPeyVuh90V87D\nXZBRG6ApmFvSTqATDeMplUY5xhMEyQHK/YxwkXLHfayXCfxaq1/wz/LbFMac\nMDDBPPBLjoKn0/dTdJpF5/1dmH3ULbNDk1sysvlt9+6tixrpiY8cynaCSo3B\nQqrAMaHQIWDKF1VNCe0d0i+Zlrao7dk03FiTDaRDGEehGnykvNyKnO5F8Jrq\n7RMwUx2zR1ugYvDm5JnPYDRp7sIl/K0ekGn4wfSudDNRg+wA0GeGLqy3Kq9D\nH06uKbob76clCBe9ULo+wsghWSW7iguat4L/vjPa+CnrZmCJoIKHj6gAlVYi\nX7BAzjm7cZa6R4ITtfuAM9j1bVI/4C7auaMuU5B5tAVv92t3dLDppf5lYqkv\n1g1l8DaR4gofPoFa4tkZcvYIWhO7G13Av3Z/X6DaFRgzPfnfmd/bX8zVWPRV\nh6Ob\r\n=c9Bb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICkNDlfnRXyjq4uIt0x/C0MbdeI4ku4lz4YMhBLzl6s1AiEA1yEOLg3xG8CKUcyzUde1Z3LkaYzLLw7J5h7bdZUh1/s="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-master.20190417085112_1555491158928_0.97574054230699"},"_hasShrinkwrap":false},"1.0.7-nortissej.types-open.20190417162510":{"name":"@atomist/sdm-local","version":"1.0.7-nortissej.types-open.20190417162510","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"f30d8ea67147f1e8ba079bb8e998442fe5a62870","_id":"@atomist/sdm-local@1.0.7-nortissej.types-open.20190417162510","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-wL+c8KHFuMeELVYpEfLm9GVN1fzd+Ci+F0BpQe+de2Ov7Pmyg6/L/uk72aDxf12IKnWfM+wCtMqh8ptyhEI0GQ==","shasum":"54165239404ad1256f1d68292ce957e7f36732eb","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-nortissej.types-open.20190417162510.tgz","fileCount":357,"unpackedSize":1229487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJct1PZCRA9TVsSAnZWagAAaPgP+gOuo/Gn5Sm6HyvOo20Y\niUyFbZRWjhx4puuUX4iLQAhFSl9HTSUpMf6iHmy1KUB80bvEJ2ApiedncZ7c\nYgnahzp4wkSopxXuQ53/Xoxhd3H47goiMKxdCELsQy+FuEFk3b7hNPQIEj4h\nXjJ3tK2/6elZL++ctKUU17GGq9C8O61UQn/r/BEAXjfbhpIYgmuRGNeIqzhm\njPWpzBxmiV2yO7kdQkEre3eex8HMg6bfiaTfIkRzTEQN7c+KzhWluThaUC8b\nlGiVSFaKXGOoIGOKoFQbxBUSD590Ae9ww06gak2L8j6xm7uRjipIszVjwy2D\noRXan6IJouMhC6PZz3XfdJP/HPUiy5JAcn/IgnxnioGIHJJ2mamg5elG6vao\nvBMI2LLE1fiD6T4PXDXs+9gzd6z4L2JRXmZAyjLoJhh4JN7M/IdfjTU3jfaH\n30KWCCe8ZF4t/WUMPtynE/FDHQnPFVpwDmshtIFXVKaHDu2PLRZNZkrlLQev\n7tCZ2G1RnWmBIA2cXuRGjxgAEMGDPAvEjIzk9OHrqawCPYdKJc3ckRaPQtIL\nqsPTvFMxbC91y8DbN7kBIjn7A6N8bOhRyMENvF6BawTmK8086DM8cseuk0hU\nvskKud0EJ84RYDDTVyoh8DfSg4D6hjFeExv7ZQ77hvcfeQuBErbuGAk2soRT\namzw\r\n=lmfQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIlxBtANF5CBZnMJxEFPxXlf2CnDR4jqWw17FLuIpLWQIgf7z5fYQSHJuSUPPuH31mEZqrO9Jx8IdX+qj+wScYxBg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-nortissej.types-open.20190417162510_1555518425154_0.9521565802301799"},"_hasShrinkwrap":false},"1.0.7-master.20190417180748":{"name":"@atomist/sdm-local","version":"1.0.7-master.20190417180748","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"cced81bb64e3398804be98b4661d9d4bd8c0920a","_id":"@atomist/sdm-local@1.0.7-master.20190417180748","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-kQnknIfhZ2mqC5e+Uh064ynnSTbtyuqs08oZS7cYNmni26604USBtj+CcLGkVPT6G5c4ydfQbQrkHB4SCce6qQ==","shasum":"5f12cfa0625b49fc3219191afd6b6800ab08ef4c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-master.20190417180748.tgz","fileCount":357,"unpackedSize":1229422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJct2vrCRA9TVsSAnZWagAAzBgP/1L3K/2cnq9ePSsFApdt\noYccH6Yl2sHDHDY8YAu+jSNf0vZWH4/jLBsKFApbyzEvB5yZjmiCm46ZbX4g\nJReVz0/pZlCpDdRhrJt9IazfalAUjK8ZKs6mTBhnALvzGVJxUdtkxt5E8VnQ\nmBhoYEu6/bfYcFsuLF9eD/bje62F4pW6Vs0VWJHGqCv44bghjaLKX2Bg7Kt+\ncjLaThozPTElC206d+je2H+Q+McFtujiZNJC2nXYFZhQhlZ4v27ouHSexwFS\n2/SJIAh6/KrbHTx4RefdONCkeZVodt1unYOlo+IA7qIgt23TcuN5TFnIpSse\nfqAJeuXBPtjAKA8D0jsuvRn6i2Q2u5Sq9reZ66bd3JKvib/8Y0e6sV067HoK\noPRAbKbROm5vPjetRXS/tai79BYps8pkt7vLBj2xCvIPgwM4/CSIGBmHwfJo\nNfBKwpl0OuvJ/2nhMPbSJEXoDtDoqfLRDwsfFWsYMuY7DgcgJFeTzUomsgx0\nReZz61ivO2yfGuuvhlagUxw5dcNFw4Jhrfg8748K4YOu15mskrsh8rcXmDks\nfrxO9tkugpROHA46QNcj9kofLVL7CG+9sV4G2oLJU97rA7MMiG3mvHIj4rGj\niXDpwLd+7vxGs9MTDE5S14qjQWq0eCYk3nb5btvFnfKRXCXiW28xWAJidS8P\nQ01C\r\n=io8w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAmdFCvXP7nOlJ5RpObubop4KZtUhi9rXinKT+tmmhbAAiEA/+XWD2eXmW0Dq9UuYXRjq/fSpP2KvZ5s7/8aS/uzxvM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-master.20190417180748_1555524585063_0.5062084898452834"},"_hasShrinkwrap":false},"1.0.7-master.20190417181005":{"name":"@atomist/sdm-local","version":"1.0.7-master.20190417181005","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"cced81bb64e3398804be98b4661d9d4bd8c0920a","_id":"@atomist/sdm-local@1.0.7-master.20190417181005","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-h9PiAN7VWHFzIVkW9uOGXkfdh3DP+Qe9+ny/etdg4LWTz7XowlkKNXKTfsCY2Qt8SWpNKrFoqnPJSFmsxuq8nA==","shasum":"277fc4e352b20353a7c2d42ebaac6bbdfc37f1e8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-master.20190417181005.tgz","fileCount":357,"unpackedSize":1229422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJct2xaCRA9TVsSAnZWagAAg+sP/ibbIHRzvHFEgTNdOmd0\ngcp7BL5eZ5L/LmGg3St82bn+Nbss3tZdYalrKjkkf99Wsx0csiXTfu1O3W4b\njstzug4pdImEhwF4lZoZDasfpXskkB+cI1wtBgS7q2xwk4OXVbjiwy3lqTC/\ns4UccQGyga3gH+0ikx6Nu62MFx5JweWcF4IX5t4cDT6/h3USHgnBKPVdZbIf\nyeedHrD5lSh6Kpf/u0uufZPD4jaCmNzg18tpn/2UeabRU18X5mHHW9RQvu4u\n9sjGF8vPOV3Hng7akqDhS7Nj4mTd+TJZn3E/LfFxhcuOktWcPxw4WEaXBzdB\nfVz+bmG1NFoRrhYwzvUKpFG+dp9/SbxEfVpj+RQNcvkdKG+YJC0ByHHUlia7\nTlnv35tzaWiC49HlkRxzimAdFsv65fS3RSc5txr+i6sUD7vqxC7N4e/Z1Nem\nk8FYpXBZP/+jlf6Bb0WL54/IwZdS3nzWD+9v51X2s+K/zR7Qcca2iYX3GF93\n0NrLz9A8+9U8FrkrY18eyc8QwX85c5lG4iL42dEhOgjyUnhR2hnLFejmPnCz\nYAH0Yk/U3cVBS+w1Y4SlKC+fYKqobs1U0LTY6FNJE8R589Z5IG+87E0PUXVT\n34hK1vmK/EIKpHu1HoquRtH7flawIlN5WGoucaayoz8Zt3muLOMtIjO45M0Y\n8Ige\r\n=aOv+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBKFGSZ3yyur8f+j57gNEe/u2+wOCO8GdgnGH5CAOpLYAiB9xN13n3MA+QlOML6IfSP2WxF5M9mjcrfJH5mhT6gfSw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-master.20190417181005_1555524698135_0.33728751641832533"},"_hasShrinkwrap":false},"1.0.7-nortissej.excess-slash.20190419192635":{"name":"@atomist/sdm-local","version":"1.0.7-nortissej.excess-slash.20190419192635","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"a96a988ba4ee1c53aac10cc0d389abc14d5b3bae","_id":"@atomist/sdm-local@1.0.7-nortissej.excess-slash.20190419192635","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-8d6QDvM9YLp+ZEEcPcnUJlPS7SiBQ9bKQVpJfrm6b8z+wTJlgZrYG5yrb96t6K3ys+cwH5zIiUMpLKa3OdhhIg==","shasum":"50c736cffc9c4f9c6e1bad1f6fd1bffe59da0300","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-nortissej.excess-slash.20190419192635.tgz","fileCount":357,"unpackedSize":1229440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuiFGCRA9TVsSAnZWagAAawsQAJT9eOB/vpekp934z3Up\nL6XBkSJsSGx7G/UrWITdD1GgGomjJkWB2D+omAEnmAP+CbwwPm8iWQWYz+lT\n3tewLhYu6e5PYs1U5XDRgCdgNsZaRwuRfU45OxJ2s6zddbY7KheZbq/Dee0N\nQpOv5O2kOd2oUr9Qn3r78q8m2k1bUFdkaGwqfBFgzTTQfztu0eKAizNYrZbs\nHqMHcUmddoqrOAlCzzOJ1pazik4f2DHtAf0GvPmDCm9WwEHKs/FUutsWM5TL\nEPPIuFY5qsgs0rmpI1gsPHurU7wkyzYkzqB1D5oSi5lsDI8xS2lz+7DJDdkr\nBfjkjwWePjsoa1tvYAhb5UM/PCUJWBD74krs3gw6rM6BU6iQPZh2iYCbl3N9\naitVxRGqV6bkOGcvQG5ZAdnn/QiLrWymbwUDgh3lGX/0ptkoBOM7slTblKix\ntPaOygVFyKq2WGW5mEcLcN4iPI+Wm+fyI8+1cQvsg35ByS8V1g5BHXKGPgi2\n5bb87E1+22SKp8RDI0t4bTaWZaStDvYINjeg+iDR3kzhAXeBesfn0hWg79er\n9kfcsOqrujCfHDF/XuvH+i7C1DYHc6zxXdFLZNK5VMjVkOdVLxm8t5j65u+L\nmEq2CA9f8z2BpBIx/AEuwOilidIT66MS+SFwLQPu1heq109RcoArSubWRFeJ\nhveK\r\n=faD8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsiUCblUVGg2izwxt3f/YYwIQyMnxCuJuU7L/rBV8XwAIgfPLQ0KEyuSZ+G1mBfwWfGYd/lCnv3OGSWHo4NC3rvm8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-nortissej.excess-slash.20190419192635_1555702085943_0.5845867082630933"},"_hasShrinkwrap":false},"1.0.7-master.20190419195742":{"name":"@atomist/sdm-local","version":"1.0.7-master.20190419195742","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"787a7cf81858a117153db540be235c0a5d73af53","_id":"@atomist/sdm-local@1.0.7-master.20190419195742","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-cCy6d24n44yPHyFYsCDguXtc4cT+yj+qaia1czV3RzygWyuV3334kAGX5hHDqzjWm5K39APAkup7k4HtLF+xBA==","shasum":"ed38771276f157583b582bc8699368b27b23ff09","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-master.20190419195742.tgz","fileCount":357,"unpackedSize":1229532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuiiXCRA9TVsSAnZWagAA+IAP/1Vj2x2zSuRhQsTjG5Ko\nAT9hXOprRH1s6FwrgBBKxBUe4AYKen4Oj64xvNNTRAeI961kUnjY0kC0RgvG\nJERR3mQPqb9Vz+yfhCpQks1ohdofpkzI4HV+Mmuay/keEtkqURR3kQAWgtBC\nBy1BseB5YXTL30e7eN3OTBgHv+6Ml8DakfAf/DyEjuaycWP/hwvIRPIqh0dO\n0uDXBDiVHwUOjA3oiFNM4yh/KawnbWMpG7RNnzVqsQqulRaztivXFzCkKlon\nY6pwBwpHjz4XVgcZaQUUfydRPX+PA8B0mCqjsL5+ey64FhP+cdDhYYgxoYp/\nOs5HCG/8YQISt1J30quzWK78EbxKsoKl1f5sUZ1Ev8M3cWhShJacq/DJlQc0\nfGA4dItzoSLP4yc/OoM6mpD2tbzg6DEKcaWYD0pGvDoXB6cJOa2MC3B+whsG\nUWA1PZnsnQ8Gtjqbk/NsEWpUNnNR8+cJF7ZcmOMmcJEDSo1YOdGK18oT/Q2j\nMg6QUKyWX+jqGNr0xSPzQA8JZ9SEZlcGGWySfwSOszFOVjiuHTxPY+g+HdpQ\nTmEnmhF9ibJWCWpHk/fPWqVHpP25Qr9ddbca49DRMtXSJF4hTa3moxjjzmsv\nV6Z5w/Ci00syMzL/iUNC9/W+T31OC3H/eJUtfN/e1c6xUFZpNWiHmXM8GnTw\ngIYT\r\n=nMPW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVFkBbDqEspCJEDW3mhujaPv/gMi1uYC4Hr6PNagU5HwIhANEYglrcKuJpAWL5CwszdG5YdXmw+51djYeDdQpGEMhz"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-master.20190419195742_1555703958337_0.11148427032543062"},"_hasShrinkwrap":false},"1.0.7-nortissej.lint-fixes.20190419225829":{"name":"@atomist/sdm-local","version":"1.0.7-nortissej.lint-fixes.20190419225829","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/express-serve-static-core":"^4.16.1","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"b253d127dab84dbd143a84b033077ecf514f47a6","_id":"@atomist/sdm-local@1.0.7-nortissej.lint-fixes.20190419225829","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Xh1FWIjFns/pkZNbFPuhv6wo1a33q25p+7HCN08KexJt6M/KUf4wrvgoubjpU+IZPm4pAstNGgXLQ5dsM44E1Q==","shasum":"07f9e7aed759f2238a7e0f2c6e2fcf13f0553add","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-nortissej.lint-fixes.20190419225829.tgz","fileCount":357,"unpackedSize":1230951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJculLvCRA9TVsSAnZWagAAVqoP+gN1MvTqkA3HbZtY/fRS\nq0TXiFsR+AtajAKYMGt6BcO30aK6z+rQEaTZPijhRUjbDkjkdlCD5zgzOuuy\n1UKGhZUyLzkAD03+Bj9VjniuJYD4SbzOzssd8SWVtQv86ur6ICWwglDHYnFN\n3v1JvjHXzEFWVautBfPPQ1eEXIckw5K7eT9mNAUDMGrTiCp4ObKZnPfnFKFR\n/y2X139vgZ8uOGCKT32tS7hEY2xtVmanWIFbO3U3cs+r6jp8J4UNYdmZkeRN\nFV+qp0s2E7xaotWXRd6doLk/BLznhpK8sz9d2ZZ5BJmHHrSH4vC7FiH+OBq1\nq2HP4uINSSAbZWBcmAURylVLm07NdUN4qri5j6pjdtqH9Ep5Qj9u8/vBoNIG\n2c5HUJII39Ttgj53P93svIL/0adkb94qCOl/POculcZy9xzx5vCraIYA2+XR\nEMArc9TBivtP/9GhCmOg0NwfGfkvnLF4HcD7RXLXnHce8ZjE3Tj9z/+0K0H3\ntKntu1oExfpTiO4qT2f0cZer50OMvZpVdizGmaRNmFnp2EeNhyQ4cnTmh0LG\nJ5K5gSuwm5Pdc0ejTUUql+286g1EvyyYHorZ7JvRhiE2yi8J6ZKC8JYjAV0E\nkC/1YhFPajUmuRdtTK0TZnlNU5kDJuJ+Bl8yclSZb8GIBno2ojc/hokcH/8e\nl3VL\r\n=msoN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYrWanxcpoIplwEG9MCnfujyjNvl1T1nDjGbVfvBwP7QIgEjNoltaT06DAcsOs/dKBs3uLMIX+cAuAQMB+rZBaEb8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-nortissej.lint-fixes.20190419225829_1555714798538_0.3258524344376754"},"_hasShrinkwrap":false},"1.0.7-nortissej.lint-fixes.20190419231753":{"name":"@atomist/sdm-local","version":"1.0.7-nortissej.lint-fixes.20190419231753","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/express-serve-static-core":"^4.16.1","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"691bc5a5755638f8635295e80c47318313486213","_id":"@atomist/sdm-local@1.0.7-nortissej.lint-fixes.20190419231753","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-k1D/s9u4fX/wuD64Th2N0ZUx99BRgwbWIcMU1znUAUmLjxywkCgps2Pty6SxPgXxtyf+5Ga48GOVLOwG5A+xFw==","shasum":"d9bfc05dada7b919184008aef0276ca9eece3283","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-nortissej.lint-fixes.20190419231753.tgz","fileCount":357,"unpackedSize":1230969,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJculd6CRA9TVsSAnZWagAAgfEP/RzmUWZsLTnlEUsJtLtP\nR0AI/9hjUj5BTVd/k+botkFB5RW6VduV7aEBC+OItB0Ix2IRUngVHtRE4sBs\nY72jLAzVidx5FiSFT9Sq0gv1gFIv99Rr8koKGdPmcMnqhPJmUpYr1tQzBMCc\nrSPtnA5TE/TpHRKdZKhPNTyw4U2I8ZCW+rjVCLeceuTXDO/7s7u7XBBzr1UU\noUly760s3FFjPjpcFrzUC+Fy8HN8RMd+E2FQ12JDj0IO2PjBwghEfB44dtfP\nMHN0aNnEoxVAZT/N9q7qPoPwUS/or8zRvXy6yBwt3KwpBYfEwKneODn371qi\nRW8JgoiS18qF17G7DmtjGjQogTpDNJ+hFY5relr+F4RWHS9Z8CcYEzu4CCtt\ng5+yH6x1qGgPGBV8DXgvscKGvJAYZYzt18PjzE/Fq0Efo1+dNHfXfCJB7woS\nI8sRp1Uz3zkIsebSowzOZ8YEBbWzDn9qYm7LLYuzkwaR91bnTgt50zp/MrcN\nU0jXhNEcIpL1C58nBGFN6sSnTR7hlbz+h1L7eYZGCsCaNA5fhL4XRJAoi7kt\nDTY14wU09i6bUOWX6pHr9JDM6+/NRQheFP8PIEO3a1lOhKH2IHodJlO8oaaF\nJwu6czxEIsY0a3AN3my3arNVHYXlJPNp3yCCwl9v/QjKc9WgmxBSBaQamSxh\n/2eV\r\n=KH/R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdnehMHDEj/fP4AxKA24gQYbMTD7iC0ATFw/MFWLu7AwIhAI4jnRc/5fZ0ogUEhMsjQt7XKZl4+lKo7zNgkp37pLwc"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-nortissej.lint-fixes.20190419231753_1555715962107_0.9552684712841444"},"_hasShrinkwrap":false},"1.0.7-nortissej.lint-fixes.20190419231918":{"name":"@atomist/sdm-local","version":"1.0.7-nortissej.lint-fixes.20190419231918","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/express-serve-static-core":"^4.16.1","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"c700f64b54cfd3f56c6b36191b4edaa02da09cf4","_id":"@atomist/sdm-local@1.0.7-nortissej.lint-fixes.20190419231918","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-4o8KdR6mu8f53AkV311qNlXFbwAaRg86Y1nG5WlCm3mXiJBM9khWPsD7gdtHUqNn73V/rHwafXOGuDHm6QFHWw==","shasum":"ec0d17a60cc2bf099f65a9db8e995f57a7cf6469","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-nortissej.lint-fixes.20190419231918.tgz","fileCount":357,"unpackedSize":1230969,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJculf7CRA9TVsSAnZWagAAPcYP+QEgm/Gd/PSbSXNvnfYl\nY6k+qtF9GuGiwTbQ/kHmVN7DUkQI0RY0p3NN8KyPf4X4662z0JZEQRliLrnR\n5KTdziGexL8FxMeF99C8jU15ilfYKYxowATxgY8ZkfSSQJGKmQFEDqM6JNSR\nnKyImpAu3FztzwM03FBgCzI7gR5zUN+/aiQMP+BQ5s88NiEuqQqvunCqGp+C\nfLe0jTSeSR/w1pdQKlr8cK6MWTuP3W6H16ftF8gIMt9TY1y1bciu3KX6xec5\noJJEgKYERQuHZXZneBhPI4md/IYsiIUKr0kdviLx8Fhml6oz2lZDuhgOh73y\ngiSED/UR0mWvQxmUuhq0ffYUzpQXSyclmnq8diu7iMpzgaB99FA3HpvDVXBX\nIOjRN+YEZkVlCutD3PQbh9+fNG8q4U0AcxhEAvds+w+/dPp472xe1SYPDjxO\n30fox0JNjYdiOnOdfWJJEgoGxVHFd3szp8CBgpBnxPJ++jDlu9eu+kWCBsP/\nKN4+pj0ynlLxmVZdjxG0KWTQGse7AlS5SoKbqQZQyrMbpsIaWLhJwXPrAWOA\n2CIPeuoUxMT3pURLanmNbkH3Mz9QfIQp8vsVbOa2cqw1HgZBTzGUQcvTv9KM\npB5LH3eTCpe/PpwXnBXu4jMqE8rK/FWt+7TVb6rxauqYnscQBHvgpQnVFp4j\n8a2l\r\n=sZ6t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyx1o8Yci35XL9X4NQ3+7ZqLE3IBiuxh/Qj7K2IiU4fAiEA3dpMDjKVa5gzz0iU4MPUeAe/KNrvVQo3C8jpvYP6IZs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-nortissej.lint-fixes.20190419231918_1555716090842_0.3372333812250847"},"_hasShrinkwrap":false},"1.0.7-nortissej.lint-fixes.20190419232132":{"name":"@atomist/sdm-local","version":"1.0.7-nortissej.lint-fixes.20190419232132","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/express-serve-static-core":"^4.16.1","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"c700f64b54cfd3f56c6b36191b4edaa02da09cf4","_id":"@atomist/sdm-local@1.0.7-nortissej.lint-fixes.20190419232132","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-k6X57p+roJPKb2HW9AcCXmoki9a3uGyx2cDPcmJ9/zpiUnFZtYrq/NhPHvPf2zgCP1OJTgLTF08sZ8FrmEvgeQ==","shasum":"50236dbdab69280d4174806ed9a503d90b74c9d4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-nortissej.lint-fixes.20190419232132.tgz","fileCount":357,"unpackedSize":1230969,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJculh3CRA9TVsSAnZWagAAUDgP/0JcWWkcefgD5xh1gw8T\n/RwSudp7Gu6+sh2JNrjbk4umMeatcI29yxfJ05RIapLGZX+q+xe/x2qCRHY1\nUa3qJv1y86E05mf90VCvyvLgxa17T8OTdDdX9wpHzIK8wpWnfd0Idk+HYx+r\ncOg+8U362GhvpaC1mVtrV+Ifwy+GNfGFzCoKEwFJon8PUvrba9gqQLoIxrRx\nnSuiGZpynC9J2tK/L+qN5dalvVXfCXtfydvpN5dKl1QbZWc+FXwJr7pbbqFy\nuAYaSmTgfNRusIFR3oOceXM64sZRNpjdCqsWr4sitTpzSf7zu3nOnsq99ZhQ\nnmXRkxMaRR00t8uv7uscBT5nGkHTDu0cccvUYUjw1k8O40TebvGzQ9mLCFQH\nZvqJaHUDzXjgwL5TmLBmTD65YBp4N85Z4Ir6mLK1B/9C/Sq8eMNYVrXH029W\nxNlcDpyoPAslEcYdNpaoWNTcLSkWusxwsaZ3w4vrg9ZM9qeVcWqZv4deO5St\nmtKNWXvmuRUw3eG4Ol7+tc3/WYGYxeQ2VWIjzvu0atqlIfTXL9FDaX4R9N6c\nOt+VonKytcvC7ANgaYT4n67OApQOMNJ33j0oEP3HpJfXNrfhA8chW55X4gHt\nCSgID+gwn2nFrwuYwPf9q9RmxTuxY+1qAyonoxnfIAq68Nu592PcvquZa61s\nFC8D\r\n=eId8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvdUna4rKFmYuXTRnP4QyVQRduAbocPWO/C8V2JjhYOQIhAM7mvf8ACSudlWL+aMXnMGWEcEA2iZ0wLFOUHTAFwEY7"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-nortissej.lint-fixes.20190419232132_1555716215138_0.47100658065633816"},"_hasShrinkwrap":false},"1.0.7-master.20190429204230":{"name":"@atomist/sdm-local","version":"1.0.7-master.20190429204230","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.1","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.0.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"9824c5f88827b076605642ddbd24e3fc2d173c31","_id":"@atomist/sdm-local@1.0.7-master.20190429204230","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-z8Qssye91t+HjApGMyw7o7eryMSaZZLboLlLdFLXATeh1T/blLeC3kTnwWlua73qlIKux9wkV9L5csVA9Ns8dA==","shasum":"435a25212a90671fb2a39eaa7b42f68f291c6752","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-master.20190429204230.tgz","fileCount":357,"unpackedSize":1229789,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcx2IcCRA9TVsSAnZWagAAQcIP/j6jrozsh3MLJr5JPOJc\nk0xlZiJAGmmvTEGf+PsPPYSAc6F65Oq9tjFfNC6B5ghCH5Wxw4+bmSP9uuAg\ngmB1W4Gm6877l7KIiGCKjLbFJlZlwpV4I3wGUg1bEtxZDgeAO76/V1rXe4K/\nl3nS81aqp6ZeRKFrrf+icaLVmWGli1De+7g3XGuKfmA8WQmPsuLjxi8JT9gk\nnGnAPearJqyAYPmraqxBb+IgV/7Vvpzjb4NPCUUPS+l60cc7bWFuogMNv4E6\nSNXiaMG0+feNFII2WfHuS5lb83TzLM3FfAVC2QcMXqhgtiUHkBp5dj+3bBUc\nESBf/t0D4OhD5qncS2XxR1K07f6rxkuN513fJEpNsOaExQBkej91NO7u39gi\nsSC0o0W4MfsnZucS9OdpfT+T2E3tH2wlmECBNL9+z1KMhYHpgRw27kP04HIU\nT0WTnzsRKUNnWGjJTle3VPL7Qh4khfJyMrudU6PnTcB/q3yaxRoidaSyWtZS\n8jVpWpK7r8GyjQd05WVoX/d3ZHwJu9nYZo8AiC8HyATxfG+Ly28nxyqyJQh1\nKVYteUz3Lo+Ss5AQPdia5hs7CORofdivTuxIg6+qgU32Mr9IpZzuo2OkEeiw\nXfwlWaFTnODeRJW5/izx/hY16/wpe9m+iSYBmmuzx4i8hof45pZTSfldLRct\nRpp0\r\n=qptF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICW9GQWbo41BYlsHzDF8c1Zl5msU01ihPBx2fue1RmKjAiAlD9ugvYDE/WejBzLZcBdRHIN+rz5RA5R9FBg0UHztLw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-master.20190429204230_1556570652177_0.24285241758847564"},"_hasShrinkwrap":false},"1.0.7-nortissej.lint-fixes.20190507173849":{"name":"@atomist/sdm-local","version":"1.0.7-nortissej.lint-fixes.20190507173849","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/express-serve-static-core":"^4.16.1","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"639de4990f827c6ac6667e3a6bf72be719c6d6c1","_id":"@atomist/sdm-local@1.0.7-nortissej.lint-fixes.20190507173849","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-J8ixVEV3sROfcXK5JuM9DMovlXqWTpjAQQ/qCjFggmkZAk+QJf7a3wwSaDt0ZgcmBrUg4HJbUrKaXTtCexP4ZQ==","shasum":"4415aaa09e96ae488eeb805575eba9fec4f740f1","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-nortissej.lint-fixes.20190507173849.tgz","fileCount":357,"unpackedSize":1231226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0cMYCRA9TVsSAnZWagAAT4gP/1+GfOFzvWfycXUlZDTH\nJQLINRm6ZSw13UDlEas0SBcX/xdKwGrOvHHxeyHCFKRoBuoXeKRLJXsgTytZ\nWWkq4uuXgYLgdCJpDUsrflkiTD3HokRHGnsEKmMJv3EFahXqwiEF9kL39Z2I\n1HZvCBfxlHFNLsWvOXADPXn+fj6EHX8zLZXHT9upuGGpQsrm2/ZgFjQmANPG\nO+Aox7IOMHHppCAIbi6Inl4+/5JIeFqbmO/HWuxyHVVy1vKYNdPBRJP0loSh\nM0An4R247kZrUYQTS+TEM397a0Wo+IFYn8sZgVYFsTge0py/eyBu8sn/HB+s\nR2k7UtVgJbb2Rd506jQ+vNpnJndJsQYodNKKrIsgssRbqe4+fyfCZl39hC7L\nAqbj5ssVOdsdzeiEVavOhlhcyQU3Fl28tWXz+Gk/3kZqBrVH/2CDv5cxJBM7\nBl3LxfJpaggvGi6QpdnaesCf8chm+RefBHLcOFeZelsegaUZH1Rhm9g1z1iz\n7Oc96X3SAiJ75tr7CxtL2kLsw2AF+28d94apn50kSHwkHR1TMy99DZn8pVwM\nlLdpw5unrqZhQk6q2Gjj0yNGlTsElGsbl1at5/7AX/UPGZgu+TFZpU7JFS56\nK5OJ2iOHiGB08EjJQlQiy8bjrefaMBtaaL81VkU+PTY8FleccFFZzwjDA3V3\nb6vC\r\n=FHSd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEF8TkH0Bq9J/hDJ/NopnlPRYXnk6Sm3BhaxTBtgr7tUAiEAk1HcE6Ds34MdhaWb4i2Iy4nu7QfPiYrTw4QkR8AfCCo="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-nortissej.lint-fixes.20190507173849_1557250839771_0.08826268340824805"},"_hasShrinkwrap":false},"1.0.7-master.20190507205218":{"name":"@atomist/sdm-local","version":"1.0.7-master.20190507205218","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/express-serve-static-core":"^4.16.1","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.18.3","boxen":"^3.0.0","chalk":"^2.4.2","express":"^4.16.4","express-handlebars":"^3.0.2","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^7.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.1.0","terminal-kit":"^1.27.0","yargs":"^13.2.2"},"peerDependencies":{"@atomist/automation-client":">=1.4.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.3.0","@atomist/sdm-core":">=1.4.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.4.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.3.0","@atomist/sdm-core":"^1.4.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.1","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.0.3","tslint":"^5.14.0","typedoc":"^0.14.2","typescript":"^3.3.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"fe5fa8ab2b3f426d836c94758b3eaf34d54d0308","_id":"@atomist/sdm-local@1.0.7-master.20190507205218","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-kXq7JGfSU4tUL4guXTybwmIyxAo5a58adkmh35pyn+WnJ9ArWJ8FyCgorwgpqNNcX6Ur2VOLOlGcmV1VskFvCg==","shasum":"110bbfdc5f0dd041125325174f60a935ee7ae376","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-master.20190507205218.tgz","fileCount":357,"unpackedSize":1355332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0fCBCRA9TVsSAnZWagAA/EIP/As88EilPC0HMES7Qm4E\n3iO7RJDnm2uLC1LiR6T+7X3gkmwgDAjmqxUWw0zoo/1ZlkOMnssa1x34oQOV\njpAAz4wEaDuZGOOBuHkaYu4YmjABESgCUBasrTKNtWghmsJAFvOx+i9fuIY7\n2BjFk29eHXsVPgtAqLD+ZesBm6SHBVopR1x51MNP0ln40SqGvtttLcha2jtr\nbNrVsnhYl4MBPRupJVQI5Q893WqxczH3zzBs92otzr0LcPx5CbUw/MjqTD9s\nFodWvUe4vSqbeUKBZz9qAc1t3vdQp1f1hRSsUTdnu0aAlKmmisIXYwAPJl7v\nDzwrpgYd/Oz236rzBT7N01LoCk7dajZPHGaejX+m86CEtcuVMKa/0VCY1cOe\nCDxc74rRcyk1WlMT0HhCLeyn1rrffUOMXnqws3Df/judyoNUxGqG2G5RXqlk\ns2YpIE4sU3peQc37OMI/Jc1Qq5NGoQZXBAj+uFz2GQ1IOlkZ0jnzlvqStrrS\ntRTJDinjEAC5lJanYAgSorX03L5crT6+cwxK690oIcyyQZ6VJb1dEkA9Woz9\nEp76Mu8gMkkqW+fTrXJeaIuD8tWlnlpHS+ZOLKy0cgzIS9DYOXtl5BguBpm/\npD8nNEEA7BSUTB3gdnQCNFjDJTlS7jsZ5TKNXIRY9UQuZYrmRKfFpgv9MSQh\nO4/a\r\n=BlG8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA6g2CDgcRU/mVFq+rvkKi/Ptd2IXuKuX86TmF7Am4hfAiBoJiD/T4MXb89q7HodORV5Kyzh4n/QHoPWj8+tnA/eag=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-master.20190507205218_1557262464372_0.6310408554959317"},"_hasShrinkwrap":false},"1.0.7-master.20190527202455":{"name":"@atomist/sdm-local","version":"1.0.7-master.20190527202455","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.0","@atomist/microgrammar":">=1.5.0","@atomist/sdm":">=1.5.0","@atomist/sdm-core":">=1.5.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"1.5.0-master.20190527141005","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"1.5.0-master.20190527173300","@atomist/sdm-core":"1.5.0-master.20190525162949","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.16.0","typedoc":"^0.14.2","typescript":"^3.4.5"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d8e40c8da9af30a7732bef1afe3e07da9afe4b2d","_id":"@atomist/sdm-local@1.0.7-master.20190527202455","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-zyXsQMYI0GtioZ+L/2cCCN1dnsQeDfIJCECHtb3vayg7+X8o4X6SwKCEOqE7kXJz/UhitSYpvs5Xn5vTDWzKmQ==","shasum":"02af5e00072142247ac4fdaba27f442d9546aa1f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-master.20190527202455.tgz","fileCount":357,"unpackedSize":1231187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7EhcCRA9TVsSAnZWagAAIKgP/0BFGsMCapj84LovrE0G\nMkXBZEVYAsrcshwqNiqbUG1yRpQItHWSrTSVB6jhPLnAMk2SVD3GKlaMg8Un\n4sJ+x0wNYkZrw/McoSBJcQRvrXHJysxTnV4rSfQ/FB85Av+xTXiP+xAKKsnE\ncsMabf/l9pIERAgsdZAchhfB3Ah1ql4B3VcVhuPEvBdmSbeCmi5ZPCJw/rzZ\nwW1NWTJBzwwoSxcYQceWRuMVvol2opf4N8Kvaa6sp1GLXKHgJqnSS/cy0g62\nq03+EQNBQLLPa6HB+zaaIOp1yVs1FZ5CGfpiOtnvkigQ8ucoWw+UbrQzkHM5\nG76OCM0Iv9cnpSidHDCpo0zV/SOjVjriSIiAJTIFKCbufmhhMRQq8TF8NnHx\np6HsI5lV4YyBWMzPTJ3cbQjHa7E8vnzOyMyoMhyQScjGjiDH6bx317Q44VoJ\nnLdwql5xk7bvZmXiIB/dnULfdnfo0t4UVRbOdpKA8O+9wuL5JFMiq6jg9I5H\nV6AANnQvC0mWQDEl4ncA/sZVCASPIypTb4xtsQQLEOtk85bmc93xRtLK4pj5\n1TKveaDocllkO/wZMoTKqY4iuRUKzQXOd9ChfbOFy9CM1TAFOV4aHKolw8FK\n+Wwg86WH6XvBCBFgSw7L3Fzhx/TsaB1v77moE2VKyxYPOjgVHMpT3SnjbEgy\nCcYg\r\n=zQh6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjjwPfnM+gpGAIpRr55u12NmqhjZhql6RXCPNiZLOReQIgWZ61vSkextTlvdgWTuE3nOzDWdkUxIJz9AFad72j60A="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-master.20190527202455_1558988891964_0.4368346047444587"},"_hasShrinkwrap":false},"1.0.7-master.20190527212538":{"name":"@atomist/sdm-local","version":"1.0.7-master.20190527212538","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.0","@atomist/sdm-core":">=1.5.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.5.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.5.0","@atomist/sdm-core":"^1.5.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.16.0","typedoc":"^0.14.2","typescript":"^3.4.5"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"cf4f8504c38fc59b80823ed092e511f967d89dc6","_id":"@atomist/sdm-local@1.0.7-master.20190527212538","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-mSb4K61fOL1vi0QlW9DOc68iECa0UwgDrUIXAwrUV4VvV4Fceoiqq/3f2DheVbU6gNMsYrssRDDbBMDak4kneQ==","shasum":"418826f3ef93dcdda8059b06b6954c8dae6ddc82","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7-master.20190527212538.tgz","fileCount":357,"unpackedSize":1231124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7FaDCRA9TVsSAnZWagAAsm8QAKKZ+Bbz99GpFXEJYMP4\n7OaJNwLQa1zaYhuuyH+0yMJnx6pGIuPqmE2mlAT/0uKlsvETeVBeUmwwsAID\n3rjWD9OZKGuIzr6G44t5Yu7HqoHDMbB3FlfGGbbX/Fn0LIgeTqizdlbjq2oj\nyBYRbNxeA20lVwlFW+CJ23OAXLdLqI2nc3HcfX88czku/4KK7Jahh3aIzcQm\nlS25qi4ZJ5+ES7iJMMo5HtWhQHOAGRzBrRxjGmuK6yrGa7j7ck9AQn3e25er\nHEYXaUOj5GL7l5ckxdbsphbC1qPuGGEGsIqWaRB3SNTPTLKiAXxcNFPdLZWt\nAtOua/AbBWHSQSobiy4HwXK7BVATD7v7uIAnsD1Zk7W2A1YxoAj4V8fmr5m6\n9yf03fObR1ktQ7tMNUUvdjOtKWqqpPJrMdpN0+ilL+JdfIAZi5mXC9R4Cmna\nubcmYK3fvdKOpZpai7sfhmZ3PUb7LTpz2m7PLffAww29zUvkY/EUuXU5NBdi\nWRE6KRoax2DixF2jYbcdgjcq2hd4bySV9Zb1N5F9cwh4qiqjB5fXgoL6XyNu\nYeD3MrESvSZlSwtfwR21FhDarkp7KwDubcpqa1USDx+/LQjHQO/k4iYaIxu2\nKwHuW2fOEiFKgd48kWzS2ZCpzhoyQCo71uA+gunz1JrZpTur3Fez1Qh5R+Zp\n6Z6x\r\n=svQ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEeMtP7C+5k+Re6EZMRgdlgeMGsSTLnNxfzCp3oIl/3pAiB/FXWuAppW9zbhs6SOwo7a6CN1is0bhorFPfSlOrnP2A=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7-master.20190527212538_1558992514760_0.9439906127116535"},"_hasShrinkwrap":false},"1.0.7":{"name":"@atomist/sdm-local","version":"1.0.7","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0-beta.1","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.0","@atomist/sdm-core":">=1.5.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.5.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.5.0","@atomist/sdm-core":"^1.5.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.16.0","typedoc":"^0.14.2","typescript":"^3.4.5"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"ae31c23846a2e49b6343b4568d0988f6db0c631c","_id":"@atomist/sdm-local@1.0.7","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-asF0fbs/uhX/V4U0XgJJTmffgTpf5iJvLDRV+V5ZXYjKMRHgD6pquD+7zRR1vcO3Klbd8w0fio/ERDy/sR5blw==","shasum":"d691cd6a8765a512d576141e0c471edad50fc9dd","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.7.tgz","fileCount":357,"unpackedSize":1231102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7FbUCRA9TVsSAnZWagAAZVgP/RS5GlMD69FCXLOIrsK6\nMCq9a7B9kS27/M19Rt+avk4WQ2f6lfaBpFA2jVp4iX+BwyHYq8Q21ysoHhYF\nUUTANIoj9YKjKIlv/QMHETBB32HrCMRXqkaeBxi4ZgKMbMp7g7ZbsobdcG+u\nuacjO5IIc2FzsNfyLj6SUCVxQ3hBkXuHVvEsffXCzXJeEWzJdpIYucqtF1WE\nbub2pEXZYd1o5CEWEvFG6v5y3Sx8o7k8/RRzkTWvnGrcs480xqYVdtwl6Jqk\n8DAoh8xMqgkatz0+kKph86ZBCU+qy/BqWKAlVYsGZDaC456+3XI18mKKqgHH\nH8N6Mh8N/OpF+d6Pay6SA522EYipUBIKG/PaaH7IH7DmWwu0/e/M/MjcB4o1\nXr7t/bnAC+oKFVkkw1YAxbyPUdbYVETIZFzsnBmrvkolTkppDqgh9dE+7z6t\nSjiIBV3SXIOCRO8kaTnqT5vzNIhFRiu37F5XkCBhaP037k7DctG/baeFKjuT\nViDz+muVaQwLHwRRSwZyFY2Epa3EfQIUHcCOh3IsFEDKlctp4NiiWiUCz5eG\nDAjh6eAdpp5Uq84iY78SDiVeP/6sF7F3Z6EVaZI285wtAbZWHLnlwisGGgYC\nSCVwXBh23oXqHcTmVMOqP44LKD8xsDwtnSgVvcy7Xwy+0j09n8cNCHLlFfPM\nltkX\r\n=AtnK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFjwIGtN6SCB1mHtHXW42/VH0WzHKcg9EuVcnxHPZu7JAiBYlY2xe6pDIVMq693tsplVwI9tFcQrSU5QFaN48Zwzmg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.7_1558992595754_0.49399903696020786"},"_hasShrinkwrap":false},"1.0.8-atomist-update-latest-20190530225143.20190531070351":{"name":"@atomist/sdm-local","version":"1.0.8-atomist-update-latest-20190530225143.20190531070351","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.0","@atomist/sdm-core":">=1.5.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.5.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.5.0","@atomist/sdm-core":"^1.5.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.1"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"2109528cbfe8ebfe49f26e472e0d0464f6e4121a","_id":"@atomist/sdm-local@1.0.8-atomist-update-latest-20190530225143.20190531070351","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-daaqv8ac/W6cuSgki5WKD8hCIb2mDFARBYxF4Abw4X8nhcS1fiNH8hvMvsXYL1lt+mRmPUhVItQbJ1P0QkkNKw==","shasum":"02722d0d73c74a6de388d5fd690c06bca73d4941","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.8-atomist-update-latest-20190530225143.20190531070351.tgz","fileCount":357,"unpackedSize":1231232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8NKKCRA9TVsSAnZWagAADwgP/2/kTCJTFUDr2fF4oVqU\nnLhzj4azAhgH2mpSWkOUHrU4U5dOgSkNCd+LAmw4BxIyNeh2TrCetTsVndLw\ny7tU0BiQbfU2cS/kExQ2/ouv+ctb7VjRQ8CBGn98kVDDFUMjwgXrwlRJOVyq\nTuvv5lo0aKeZ6720duSscj7LM+WnZDojJ5HEEg2C5myjZlRXXnmzwyKGGlT5\nnMormBnQ+KlbgTudGuv2OVQ/Bd02KIqz6rGhqnSHZQTxbCJgFqydouTuqD6t\n/BzTLL317Dq6yIilrQQbjV9RIuHtBKw2jfAMHG+p5jlkZD3NUaQh2dSEqdWz\nqiXTzyyYLQ5CDtexM8/IS2U1762aGowzuoRHCh/8wdziQQFdlBRQaS+8E1T5\ncCj4IgJ/VHCq5oakQVQviQAylPAtlS6Bnr4jbgYKYSnABTQ7RxOKGJT8HJ6Y\nLR8F1wWuEW53j0/Vfl/tAVaChMyToURjcLQmtVjSf3qYC3geW5v9W7VdX8/y\nQwECqmQxuQebrrLoKCaHoOz+T0JASzrPNhH5Adaws7jTc4CT8msikUE1o62x\nU65b1OFDDTN24HEYxuuyuYBMVwQB7PTiAwxBzfc4OnmR9QJNeZZlKeHYfWx5\n6ABScDnuAbcXAqKiiL5mZgFQHgLzLVnK2565zPksgelDk0fzaJFqxDIO8a5r\noo87\r\n=nHfm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICWX5zKdKip8JwIQxYY6YpLsdJNMmUxOeawYwXegDhxBAiB//GpJPTPckfF+BhpSZNZKOLsCpNg4kU1Wo64Uws8UyA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.8-atomist-update-latest-20190530225143.20190531070351_1559286409515_0.3278886678842048"},"_hasShrinkwrap":false},"1.0.8-master.20190531071033":{"name":"@atomist/sdm-local","version":"1.0.8-master.20190531071033","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.0","@atomist/sdm-core":">=1.5.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.5.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.5.0","@atomist/sdm-core":"^1.5.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.1"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"f6dee8b272248aab385f840f4799a707dcb7af26","_id":"@atomist/sdm-local@1.0.8-master.20190531071033","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-7HUZlGLjwTc8C6CYuZ4FM+dQRzKrfVR8DH3WA+XNVTebiBS7wrzqTJY3X0LmYA9WmDgRrA56XbCmaM+7fW6FmQ==","shasum":"53d277fb95b9df40409591d93f0783bd2268263c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.8-master.20190531071033.tgz","fileCount":358,"unpackedSize":1232718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8NP2CRA9TVsSAnZWagAApc8P/05hrLja4N1vWbXksznl\n2CkEq7HKbQ2QIOr08gFDq+bsVlD+cGWE6aZbxJS6O4TBGG+/jktPzH+Pzupz\nxJqrdFjMsfcuAfqW6OMxFzXgQuYFOc3ABshb2LOg1usPDSS/hMXXrJDsfOWY\nzfWhGeQYwDUwKgY2t2OA7gRxlBFhEocX6OMB7aZnGHbFcjL5DE4z4jnA+ntB\nYTo0ZYXYKYcVGu6+bqEfS3pTnMlXmCO4kq4oFBuUTY+DtEPMSn1cKaAhfukd\nliA82Wy7D5DytlwfiaWwtzzzwjjGXvBiuN9XZQ1MPljUaGa73JnwcVANvJWU\nzDfvMfrxRhMtQhIm3xAcxG1j1NqZS1G4tclh3nNjKPTuxsaHGK+zeVqgJsN4\nCsIulT6umi34LxnLepARPYLTSsOfAUZwTiIom0kIzOBbiE3AV4qQ8m9VNeul\nt9t0PlPnyPgvscCrs8TgpAnkfUIvmN9xnCwwSYjXLOE8/7M3dNuiZOTpNWMd\nRaKcs2j5PDySIVaU3LRbXmMXyw1wTzJeVg8AMZbQ9BlMOMb7O9GFALtQoZXT\nhQJJn4PPrOINtR+H/yDyO423vpzKp6JF2LOszTOXFKTAFxFa3SQMTCmFVBv+\nCo2K0M3/eudy5imaiowfqThcwRLqv1v3rILgSW2H7uIomCXX2k4HfOpZhfHJ\njHTV\r\n=3E7l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDR+FctmRH6/2RhrU+Ta4qNkWvyRpzG3kbhVvyhhPqXowIgXixoy3kAS+cSPDWbxG0VBW3F7DfcvrbT1MwiwW8QJbg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.8-master.20190531071033_1559286773794_0.06383032650810527"},"_hasShrinkwrap":false},"1.0.8-master.20190531071255":{"name":"@atomist/sdm-local","version":"1.0.8-master.20190531071255","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.0","@atomist/sdm-core":">=1.5.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.5.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.5.0","@atomist/sdm-core":"^1.5.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.1"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"33e38b6c72788866004acfd736ed12b2e9529ea7","_id":"@atomist/sdm-local@1.0.8-master.20190531071255","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-qI66OOFQVLfJIjgeRLFRD+0nP91RFYhVTtqWLvX4rSvSVUHGTOFwCNq0fJXm/S+ca+dGONWg1uaz/n9U2xzgKw==","shasum":"143c3e97141d7907a2210fe62a19b4fe70604b79","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.8-master.20190531071255.tgz","fileCount":358,"unpackedSize":1333250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8NRkCRA9TVsSAnZWagAAG2wP/irdUNy66JHEg6/bQdm8\npcW6NqLYqIsjcDkFyqFxBKrlMeY/2Uxz8ZtRZbKCjuXyHC6Pa1zsucFdU55+\nfH/GjYRUoygBh3xIeGM2peSIsEOaooaZ9OPSEjSvL6sig75lyXHqAKGfqkGw\nIY8ayNH03+2cE7cFpDKI2kb0RtzE3t4jwj5GJ2YINWXqW8Z7Dufcin5RtY+9\ntGLPhJK40p+bHRizL6yuI/PNlN3M90gQIQ/F8VO/UDI6SGB5kk9gDwHHQRLq\nUURxiz05nHHh4mFYnp27RjOKPea57Lda3708MB78D57jC7+MAlDD+bXcVKjE\nvM9rGjNTWeLGv/z/+eVBRpsr7uwL9bsCua7cVNcrAuA6wCfon5uC+G2r0sgZ\ngXvXMGoF0/jJxbCTBJFvn0DIzhgloB17VE21vReSNFRP9XJ74HaOnTtUxPSb\n/F32/qslEu80n21umviolPAiB3Kdo4vjvbicpZg9mzwwAHskCSA8DTas9pTU\nDpUorZrkYa9Y/ovWVTW8yA3xkm9TbOy4OACQkrAzg/w6+KGOrhfnfcd6KwCF\nxtf6Af/Qs5NBskCXS6Eq5QY72xMddrOwiOVwGmmax+P/AsULUyDGyG8xDB3N\no1i3maKMwk6vV+YO7EOcsvaWJ+EyQIn+XWhQvVow57xdMPIcVSNr56ZurCBq\nuXD9\r\n=BY2U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjP2uUmLXjUk5BwoAJLjsfmwFffP7drcl/EoVyfYH3nQIgMROs7Ly/9Z9dz4Cu1Sjlq5d58jV4Cx1jOKxqJdLhYJ0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.8-master.20190531071255_1559286883573_0.6384487174257167"},"_hasShrinkwrap":false},"1.0.8-master.20190531150923":{"name":"@atomist/sdm-local","version":"1.0.8-master.20190531150923","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.0","@atomist/sdm-core":">=1.5.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.5.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.5.0","@atomist/sdm-core":"^1.5.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.1"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"07f70389a1486e49a34bc492b05fcb83d187ec8a","_id":"@atomist/sdm-local@1.0.8-master.20190531150923","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-chTmKoJyBKbtQtDJdmkoFHS6/caM2DjRCKYHfAA49VL4JTgL1sYGYprg0ch7OlfOkt7Dg7jNhDBJQBZHl7NmAQ==","shasum":"a04034c62a476c53929e78ff3d293d4bd8934e7a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.8-master.20190531150923.tgz","fileCount":358,"unpackedSize":1333356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8UQ7CRA9TVsSAnZWagAAYMAP/2cUq+ZY2l11m4PoZcXV\nl/7yTVaus/jpbjvNX/ENWSMR+aRjyJ3IJHL9JQKry0W4DL/UXHJLIO+XPrGv\n2ogreQL1mH4mhuZsnrk/vFPBhtW1Diqqqn/ZNQrSBWhDYpyW1odSDWHnIF9N\njOzVxZMhJmCrdBmros3DSibvdKVbMcGHdAv9lhEKzz54mbBf89KrNS5094gO\nTv6vZn5Gk4qxaIG6nHL2wXpYpmT/bnSgVqOJoykXTYhOIyFzPMPrGYnbSzdS\n9sLwC4AOeCs/o8CQ7DKbPFJdZjQW+lXKxcGg+vnqjaee6JDAeApDwDQKK/xw\nbcAU6vuFRStzUW0S+6nso5igqsCNTsUA6SYsA4/c0Dm0OTklj62NjLESk9aI\n3bt9oQFu71LhkKCkFzkhO4R+G4rc8xZdb9Xxq+ToBPkJ175wEuy9N+5kGWFv\nNe3PyuBZjh0rAwScs3NWgRqAfsn+OAv36lhy2fGzoXy+vEZTtNM0UJusv4sU\nDTDM0gt7iQ3bdPifVJjXVUY5TEIFBV0ppxWXTEfUdoiCgJf8OAObyEjma7e+\nguCRFJZ3i2upb0IJmtad8STqfDjnium13uecbWvLavfnuwQu3s5FJRWHmRmc\neX/Nc3COoxR6JwRsmy7CpkFHVYxKEj7loRyn28SokABqvfcK80BSLicyg9YT\n88Q1\r\n=mJ3G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9X2UbCM94O0h0mCIyQZM7zx0qm85ubrHhWNW2uJJZMQIgNMLT+43z43z1AZ8vnxz2ZeI90KHgKxpVYaTq8DuO94Q="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.8-master.20190531150923_1559315514351_0.40043980511872523"},"_hasShrinkwrap":false},"1.0.8":{"name":"@atomist/sdm-local","version":"1.0.8","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.0","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.0","@atomist/sdm-core":">=1.5.0","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.5.0","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.5.0","@atomist/sdm-core":"^1.5.0","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.1"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"d35ab8caa4b5971628579b7e1d2846556948480b","_id":"@atomist/sdm-local@1.0.8","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Qr/2ssqMgRByZ2ARZ0Ydap+PAKhvJhR5pj/sTmcCVJ9UBKlSTu/456jqwYhGDIDRAYUZoN0hhUGUja/O8NT4jA==","shasum":"a390222110fe8fd3fe23ebfbba7ed0fa799e9275","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.8.tgz","fileCount":358,"unpackedSize":1333334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8VyPCRA9TVsSAnZWagAAfhgP/RLGzxuH1JpF6U8krz59\ncDeDLlpnac7+t3g6jDXgaNW4bEbs2GTFQ2bi6sYdS4rLTQsd7lYRI+0nsISU\nu6kbPNwDMs2aG8O+rLcwnbX0LwVK9lA9SKAX7XskIisR0hyTzhHkxUBWmFWp\np6P4QWbdORIVeRVYNN66FF/ryNZIFVl8J5BRGJOOqJ6BkgK1rofDtgcSAfdZ\nqv66ykQVKj3WJPInCRxtL6HAHhcyhZmsFa92ddGz1/4HjwxvueMn9WdhTmND\ncPdTi0xIz6vlx+aAGQrQCrZZ17jf8Um+LPweSylz/rrwzzYEGHh5q4IYFpv0\n6mj3BLsdZ2ks0zM7DrQH/id/U0lK+RrdTDk5SzLeMY0+WvhamBceUpuhySFi\nfg0aiWYWh6LKe0fNmvnDZgzNvfyWNCQ60shYjSazFLOf64wxOKMSU0vdcc2V\nIMuiBKTKaLARqpiiQ2bzFvrRA+dMFmm05nFj4FhYvblQZxmqHZrLBKd75HbP\nGdZnKaN/ZSfkYTqxFkH8AuA7JzZ+THOtkZRbXsGIx3yR7QZ8iDQEvaYYgBPU\n8ZIr1hI+mC1mifwChQP/orda5upJSfJkaK7PdLaRDY9zM19gsxw9oOvD8vFt\nnwCSiM0BfEPLDkSnc9Aw/fUiW9MzowHG/mYfShg95rFMysqBra22HKb6QSLI\nuED6\r\n=6U6+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjFp/sH3CTFEWWkMY42+LwbUDAJfM7rjoz4RUGrSSsYgIgAi6tdCW7QiZgXN9swIKjHSn4BzidsUKlcIKaCW0dY+Y="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.8_1559321743024_0.7311156075266456"},"_hasShrinkwrap":false},"1.0.9-master.20190604162557":{"name":"@atomist/sdm-local","version":"1.0.9-master.20190604162557","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.3","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.1","@atomist/sdm-core":">=1.5.1","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.5.3","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.5.1","@atomist/sdm-core":"^1.5.1","@atomist/slack-messages":"^1.1.0","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.2.0","tslint":"^5.17.0","typedoc":"^0.14.2","typescript":"^3.5.1"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d722a76e4f79dc4c6ad25f960f6efc5f9e9f6fbc","_id":"@atomist/sdm-local@1.0.9-master.20190604162557","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-IvXFa8tyXQHaSzNQhDJkFjD/NuUgykQcJuLy3ZO9idzz9JJ0xdTGtCEjggQeXvXg180g9DjPXCoF7U9iz/V9cg==","shasum":"f38709bac85f2015203b948c56a89a16472dcccc","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.9-master.20190604162557.tgz","fileCount":358,"unpackedSize":1328474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9pv4CRA9TVsSAnZWagAAj5YQAIEiVDvh0olOrLa+qmwr\nXQBGKAGIkjBAVHs/DR5/RwZSmvivS4FU2YZF+dMGfgihwTiYO9M8TqeVS7iO\nOJnIk/B8ZnM1CPsNXEqthtPx62wPLGc+X2uupFQIiVsUjPD5rrfJCm7R/+lF\n/CotPKG+hvasbQcdLsHX/atHZ4tFfk85WMkYgAFFZFRRUhnqarneTuW228tu\nAmjz0zpWlg/HROTcpMLw/bBPdM03L+wK8aB6QpQPQXoeSByBIBSvGqmB/D5B\nJVrWK/9wDnTyyx/briVOEBfDuYv9u4dn/ANjMd1Wl4c8pX9Vj7zXDTGeQ6DY\njPfyFKnD/EoAxeunpr0FOrZjK8eceaGd479FTQUe7iP6Sb0Ni/3+CMEgD/Vs\nO1fnDkoTrjiXMNRJXLnloeNPZXE3JY0s566BbLUpF0UCxBwLLqcJm/JHx3xW\neO4ZC3DmQPbOYom5uNi+m9em4PdWjZMtCKxjZNQ/wQdCLPFBqH6+8QgThmlZ\nkOSTKK1vDpLACfHQu5gYEwHCNAW4DNLxraI/HwGBfDUH7wJF3p8B4c8sKMQt\nT5aPM9o1BKyfxucIZ1LpK01FHarGmUKmg4k1vcsuH/sGUUDHfahhWT8CW5Yp\nuzyYU/SUkQgjrKxl8i8sAVWxolBLLZ1suUlABHRdVbXUF5gCrtWJWQdE5iDc\noAh3\r\n=LMy5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAY4XqUrqnaqavrDWaG1FzIWS03+SetLrs+GNK1T+TAfAiEAwqUYNunDtzWJo9ynnYctf5JQCsgdnLsD4zKYYVJp2Qc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.9-master.20190604162557_1559665655983_0.3246861498858147"},"_hasShrinkwrap":false},"1.0.9-master.20190709113115":{"name":"@atomist/sdm-local","version":"1.0.9-master.20190709113115","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.3","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.1","@atomist/sdm-core":">=1.5.1","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.6.1","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.0","@atomist/sdm-core":"^1.6.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"eea21ceb94360aea83f6739b152ac1555fb98646","_id":"@atomist/sdm-local@1.0.9-master.20190709113115","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-aLJvcAYbpjHnmYHFlZfwcQ4wFO19PnvzsI/CzmNvbilU30eUInuFpMC13NJ1h2S2mZeWCn1lISPqL8h1LgkIzg==","shasum":"1bce5de1d2556efd3b702b8ccff1ab545becabf5","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.9-master.20190709113115.tgz","fileCount":358,"unpackedSize":1328880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJHteCRA9TVsSAnZWagAAmCEP/jJgonJkICYzYvmF85PP\nFUNqPgWS/tz3pETTgWIZ7M3JREPLAGypFXmCQgXFps4Knwn3jxCZ2cqvgKLS\not7VZVxPgEIsZxoYaWdX6Tv1klLZgjd2eZYdLzY4fDh2Z7NrKTkprdzsKv9X\nz7vSV4C3Y5uWkBi2znltMrzuO59zqoHwIHpBO3egOCwZxwEshTaE7pHcv2L3\nTG3vH/sdqJ4b0MYplvO75gSr4y1QXbhuS68WiSHxn3MVwry2WpHyXhEiVJpq\njYQgV6bgi1YeQdkkVPoIbwQF1AuebHjLeTWMF1tXEihvib1aEjOy9cuQEqo9\nLCEkT9YUlNmPzushHmjXF2N0CzjkqMCv6rVbyXfC9c4zXIkFKbAUvkbczMEO\nP2krc8roGhq9aVNpdtIWRHxhKfQK+ojdWsSeT3W1L6E/LWQCC/y/w1fGOb49\nd3ceWlRHEScwrcZ0EiMaMut5ZsLuOdMfdGGA/cbw2I1J2Es9VjYA1TGDD12P\nkCtLsXNs/+bGi49uBZqvCMtF20MT77iBRROTwKeGHTvTzyuF1WOWpYMdh9HQ\n4uXInGiM5/ZS4E1tFj2eZgayS2Gz9vbNvT+AhCIz4OiQlLfBHA+/cklXoNga\nicpOnaHC17s3c4yZYWl3sP3IJXfwYlNP0nxGGDmURFYocPHXwA9vMNBnzKXh\nqP3W\r\n=CH+B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIrovjkyUvzpd8dL4T3gXJNRZ4qoJ79GEUCgwLXAczUwIhAJvy9mhc5rz9Kn2OvcIHBpHBgp2GAgV3M3ZdXbFrQgRW"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.9-master.20190709113115_1562671965440_0.6226650042792106"},"_hasShrinkwrap":false},"1.0.9":{"name":"@atomist/sdm-local","version":"1.0.9","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.16.1","@types/express-handlebars":"0.0.30","@types/fs-extra":"^5.0.5","@types/inquirer":"^0.0.44","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.123","@types/marked":"^0.6.3","@types/node":"^11.11.3","@types/node-notifier":"0.0.28","@types/serialize-error":"^2.1.0","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^3.0.0","@types/yargs":"^12.0.9","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^3.2.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^2.0.2","format-date":"^1.0.0","fs-extra":"^8.0.1","inquirer":"^6.2.2","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.11","marked":"^0.6.2","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^3.0.0","simple-node-logger":"^0.93.42","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.0","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.5.3","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.5.1","@atomist/sdm-core":">=1.5.1","@atomist/slack-messages":">=1.1.0"},"devDependencies":{"@atomist/automation-client":"^1.6.1","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.0","@atomist/sdm-core":"^1.6.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.6","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.16.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"647c0b073487063bbf10d6ccf91846cbb8dd2f87","_id":"@atomist/sdm-local@1.0.9","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-FEyFtvC5vCpYF0xmTR1i0xUzlH0wCVOI8dC4Em/vY2Fdf/t/bKfIAY3s4O7Ex24UMapDZXb8/XtQ/4rzWVY4lQ==","shasum":"0ab1fdc79635df2e9d9fce2d3a22b9a6d3a3bf8d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.9.tgz","fileCount":358,"unpackedSize":1328858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJH32CRA9TVsSAnZWagAAHhMP/AlvXVpW7SjFlBW9x8yW\n8EFfWJxLsb73kPqk2Bw3AF4FWt+WVCCBeOMvWXXzgSRhZ3MZHJ2tLxK83ADS\nhjmvS0g9DT299I0vNZJMJe6LP3jUu1/YZAgDGDfnBJP/E8MDpY6q7SjzDtQ4\n0XtuTGbZaGzQvdMLE80vHdptG5Qik1mggGorZx9wTGLc4lRs5np9+wHq4BsX\nXS2ohmPlZPYBaa2BPFW0KGmNCgpiHXJ/5gNCdnTaYeD+pkH7EepY2IPxCtH1\nyQFQV0kJCZ/f9yFMFKdn6+iHXYhVOTQMO+8nmqLL8vXO+wZoSDJNLEraEGHl\nUa04TK3pODg9gWSvjtIRv0SRd6GEqfqaMsvUVtC3xzzNpa+EIV5IVwVqRPbx\nA5UH6BtcA2ZY8eRdNfgxEGCr3LOvP7CxEPvI5uHKgkCYe3FlF3R6hab2hxLZ\nZ6Imu4ofbuU5ZlvjfmocdGxWNj7cRvOmKyGZ58NNRqWZhPSOTULpvYCcmczM\nl2Hso1ZnWTQJJNF9DXO55y9BbH1k99kkcBZfo0L8E2Kn25xczzqjGoKmOXen\neNyOreNHNyV+dnEwyl7J4T4qSPIRRIyLvSBTnC/gBZjaixSUfSq00h3oG92Q\nmwohUZ98m2K3MCdnc0ubcLRDe5YChZ/1R1hHft1qGza9m7TVY5oOZDK2Ugwl\ns5fN\r\n=vdkQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHkbHirF0SRO0KuTDS+vEFSedgRTk2dCBC6RiEo28QmuAiBik3OTs996LCg+A0M9sdwSiYWzP172Z7AH6elsZEU1aA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.9_1562672629330_0.7471258461152999"},"_hasShrinkwrap":false},"1.0.10-master.20190711103432":{"name":"@atomist/sdm-local","version":"1.0.10-master.20190711103432","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/serialize-error":"^4.0.1","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^5.2.1","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.6.1","@atomist/sdm-core":">=1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.1","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.0","@atomist/sdm-core":"^1.6.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"b9ab1059928a744af4a5a8ce5093b402a3a628cd","_id":"@atomist/sdm-local@1.0.10-master.20190711103432","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-YpBx/NJvoItg/RRzweo8Q7qk9L23quwIrnUgktJu/qNywCJuSh9kMd7fW2I+ySZcLo8btomCMqc8JFuZI4LVdg==","shasum":"9ee1ff34d3679b3b52793e8184feb1ef43e317c7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.10-master.20190711103432.tgz","fileCount":358,"unpackedSize":1329594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJxGQCRA9TVsSAnZWagAAZikP/38OJjd7aYu7wOmLb6TP\nRL701kXaz6t+FkLhmPxDHR4dwAvy5cFfaojz67AgiS13FQ2mY+0FgCT+zsxs\nzdn5zFIesAW6Fy9tkUaxIrAowv92F6utjB1zsK3O+4lWrdQI55ZK1zCGuKPt\nEGsg1+3IL/TAaShrafQt1zCxXrIpFhzYGRjCXSxQBXBLZEU8V56SdItRX7ar\n7RDM1kXYgyL2pcaEuFliNkiblxYDwRSixJURoo8XERHlvzWmx8r9xpT85TSY\ndRH7qxJ1LZ6QHML3BlobkITfz4/rF2nMktvVZeKeBTmvs3q1YdPtbJOyW+Y5\niptUVjD+K2FcLQFHSOKEPM/2czB7Jc7pw2Zf4AVaD0XpH1foa+kWwA1g1+oH\nwg1H+Dn9wTscT27F7BhBvJd19yqxFCgs1eih9kUS2s0KC4f3N1LfnXmPJx6D\nPZdrsAfCi71q5f9DOx1HsJU5YSHzYVtU9apKoVNQ9pIZpjZkkYk5iHae38qC\nw2HT0t0SHp0ueXSXzcTdbxBWzWnya215uCOX8HmMJBTKMvuPm1wZZFI26Asq\n9TCa18esq+vq7N52I3338KFXgg80q/g3dsFlZWSVAqAm/3lntmoz3meoBkVL\nuPAPDqLyV4/BRjfAHvNLqCwCU7fkqBbS4+HfLn2jD4SrskwClgHtThHdQ7Zy\n7dww\r\n=SwLn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6Dr4gxgkT29eib2h0vS2Fdpgk/e/VSpO0JQmJMVWqPwIhAJY0J5mr+LP7occf5/S4kTEd5sD5yoiKITQoqkV6+VuR"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.10-master.20190711103432_1562841487784_0.3665034119833772"},"_hasShrinkwrap":false},"1.0.10-master.20190711103748":{"name":"@atomist/sdm-local","version":"1.0.10-master.20190711103748","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/serialize-error":"^4.0.1","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^5.2.1","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.6.1","@atomist/sdm-core":">=1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.1","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.0","@atomist/sdm-core":"^1.6.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"ba72f547bcc322a679820fafb763c96673901e3d","_id":"@atomist/sdm-local@1.0.10-master.20190711103748","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-69WXH8IDd5yBE9AjcnyOkja11ij0mDuTSidmjpKWUl0R2aUSEFom5Oh0G2ilzbVOicNtjlHhU2udiEehjzQKhA==","shasum":"1b05450fd7bd103ac0f652be5a062f4b7590e5e4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.10-master.20190711103748.tgz","fileCount":358,"unpackedSize":1329657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJxKiCRA9TVsSAnZWagAAqg4QAIF7uPKGj2bFGCsIzY4B\nRzbQE9RKDuvMoJoQQL+rVpy6W5mJ6ogfxz9ltEARlQHgDtuZc4s9dNosxVlJ\nnWoBLKfd8qBpidyKY3vcx4hw4eN0WV28IOJwAxiOO+tNviTzOztFDXF4ixSi\nKKI3q2miLH3db/a6obizw1u4AK4GuBbcnOJ4gq17FxWoAZiUrBqR3R5ffs89\nxbYs5ETNW1mQ2UWa9jEzle1nydDTezIMK4dA/6irJJqdxFk4irrI6ExSgp3T\ngRCczxPDVfbqxTXRC+g+h1f5SRJ8eKme+bFZ1PUcIQBY2cvdPM8LSijMngTX\nEjeNjxGgg4fGqfM66Q8e/hNMmYkTAMVDw47JOzARAXsgPBUY+LwbEtcjf5kp\nm2O1vJIawNJcyGmeAC+D004+tT0urhhHLnOTK5571AFHLNVYqEcSiTXdDxRS\n8ojJbRIsOWrBFJclMLFoyX1vnEzH0cjyuySck39DbATHu4ZtWD3a+hMTpyLI\n/GJutRg+52A1t5h3DDxv3W5VYA48+2/ujG6Gp2O7AFlfS4UkbPgK6WFSZo1E\nLh7M7SWVeghIiDZI81yuQw0dEBTmnlGcDCABkL5R3F26KxQKKhdXnK+tjAO6\n52UDcvx6xMrreoJTQ3SZIWObeS0SSkTRwrAxfwZGgskI8/ncL6JluM/7eSXw\nMWlR\r\n=Fvno\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAP2X6oU7CuyDC2LuMIzqaB3dzwPxtKDJXN3fW/i1biQIgQjBd55qYfGTYN5yZ4WI3deUM/AH4HzABuyWOKxuQtXI="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.10-master.20190711103748_1562841761679_0.9647800312154029"},"_hasShrinkwrap":false},"1.0.10-master.20190711104206":{"name":"@atomist/sdm-local","version":"1.0.10-master.20190711104206","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/serialize-error":"^4.0.1","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^5.2.1","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.6.1","@atomist/sdm-core":">=1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.1","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.0","@atomist/sdm-core":"^1.6.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"ba72f547bcc322a679820fafb763c96673901e3d","_id":"@atomist/sdm-local@1.0.10-master.20190711104206","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-JvgnyRDVnT01dD9GZLWZ9gD8oRtYqZOnqrh89aaxzZMCc2QlXeaALOOs2kKFosAXW1XM6ZY+tvRJuiESoDxT6g==","shasum":"64852e150a2cac8c93c747272da8767a4c3262ab","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.10-master.20190711104206.tgz","fileCount":358,"unpackedSize":1329657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJxL3CRA9TVsSAnZWagAAOyUQAJdaUnjOdXy0BC3VUITQ\nCLi7OtBpvmb8cSZTJDS3TDwb8llzZJWy09KpWz1RF3lOquTD2kgaUj67Phbr\nyH2rcoEgkG+mg/0afmSqjK0gmiZjj18/d7SXiU3I1q69Yi/NluZMX87v82Qr\nxi7VSaPqDt9A09QmvN5EiQa47IV+Y278Lulch0Dq0DjTEHOBxBDj0R0hQaXF\nIbPjz0dvh6h8GnonVBKHL+BPX1eTJrj82X3DfOE3yx7QkTD+ab2tzmc8Y+So\nwVHb8jHp6Ajok9DNAtKGOoGGfkF1VgMIa1+0cwsGiNJgrE/6ICqFFqYGwGwW\nAHy7NzvtuXPTR5ijfa/XoSOzGbHapy/1Wxz/R/Q0X8H0oZk41CLpR7Ogk/RG\nyfTgINR+BB5jlkIyWFDQm1JcivFgR9FIw+rBqVnXirZE/C7JjcMMmXGq+v08\n20maP6vhEUSVR3MKCC3ea2LXGeNHCs2wHsd8cEo1FWjMqTh8b5FNmkxrbQ8X\nlq8VsA+uQ4MwCSZp5GhXjq8r+a9K8PjM9yhZjEC61CB6LEb7IJboMVbZU5jB\n+pjQPjM56QOhddIg2ClWgXBYLu7KpwjebC1WCS4tswx5wh1qLoPMzJliCBjq\noKM6sYRbn7mg/WB3UjW+tGLgRTf6sPkcXzxKAIVoQ/C58eMxIvQZKCZwszOb\nk/09\r\n=BBXK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBtNrkC8i7W+i6NKn/dtn9wgWb+ZTaB3+QH4JsMtg59LAiEA2f0xfDkhyv7VpYIP8TgAZUBhBfcoWObIc+i5q5uFsT4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.10-master.20190711104206_1562841846480_0.7573161506779613"},"_hasShrinkwrap":false},"1.0.10":{"name":"@atomist/sdm-local","version":"1.0.10","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/serialize-error":"^4.0.1","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^5.2.1","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.6.1","@atomist/sdm-core":">=1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.1","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.0","@atomist/sdm-core":"^1.6.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"da058834d621c81233614140fdee00cadda1bec5","_id":"@atomist/sdm-local@1.0.10","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Bsjw9GavNA+zy8YKvD81WAS50MQ7LKH19DSoxxnAg9OvBX8FxnMYhp6X4JvQ6jaEbmKLrmeoPcaUH9BagXH5Uw==","shasum":"5c93abae8f90f208dd7a80916467134cdda011a7","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.10.tgz","fileCount":358,"unpackedSize":1329635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJxOTCRA9TVsSAnZWagAAnDQP/A6x8OLaiV+F7PBJQQNq\nuHAiWu7056JOajG58ROyoieOPPAxr5wnbth4Jjqkmf/cMFSql6unQwlBX9f7\npMbAW9glSYKlgj65hgi5Z6f42V9e/+baRlE+7pMQXU9roVd+CspVk4myd+7L\nnPF9/lnKx5xWkIk3eJtg6HNJRBi3/cNVDSxRW7L+PU1rc41NsurgywjV/33B\nZYnAEOWgZY90P309D0VueDuJMNJjhE7O4hUOOSAhQXUsSpCfJL53Aw/YksJ4\n9NAa1B/PkGI7RZ5rpoyDmr0XWb8alM2JSOpkIcrOlsst8W4zZZ6E0lKNxukM\nDQddLD3O4gCRAQNHmy8j29bu1gWzp+Ve6b+yjhsEmw38F9I9fFgnygLNNo3s\nLRdlefLVs/V5WfTVgPblohupO2cFw0owvTenGsMZ4xzK+MmapKOHakMS4k+C\nHrSSzIrn/Bp6oFdNuAYhRhCrnJcViieoMv1Waz4K+8zTSdx2EqR9FoF7D+hQ\nCblPB8H1nCrgEa1dKnlczyCeTlBxkx78pyHRcIYDdVhJ3/Gz8dOeybxHGBbC\n0wNQoDlZt+rNVe+hLlnvfNeXPaj3Ba1USOSP445ftIhKemMvqzzyAvKlU9mv\nPi9j3YF9UH80GhFKjKvAlrQvOFAZ/ZNjmAedsLPDa/zikWvA9XcF77e3MbcQ\nQuKq\r\n=QSPJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB2DCcBr7TuxmALASLDwI3QurgJ5NQ/2GY/fkh1Wb5/GAiEA1TWXMBzGabNzx0NLSM7+26ClDnV9aPiTSGwfegk9iDc="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.10_1562842002945_0.028051693810185796"},"_hasShrinkwrap":false},"1.0.11-master.20190802160233":{"name":"@atomist/sdm-local","version":"1.0.11-master.20190802160233","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/serialize-error":"^4.0.1","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^5.2.1","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":">=1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":">=1.6.1","@atomist/sdm-core":">=1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.1","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.0","@atomist/sdm-core":"^1.6.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"83a48a2b627ea5b8c3c0c0eb773c591333907d75","_id":"@atomist/sdm-local@1.0.11-master.20190802160233","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-dcc7LisHlxHKUvJaF4NwW1xvwO85pjJxqv/T6ihgYg2/MQVYkDGV17sxDF2stlzBl7yPqvqwD98MFBUWP/rAgw==","shasum":"54ed5fad844f19467e3d9ca3d0943fbfa72a158a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.11-master.20190802160233.tgz","fileCount":358,"unpackedSize":1329083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRF8uCRA9TVsSAnZWagAA89gP/2vwDRC6h9vls1k5JKSY\nYbxxADoqn93UiVINCALJc9JIffNHkkTA4n5GZhfrottjOC8efvO2TEJUUFgt\nNq/ue402rPyAwfjDZ1jFt5gjTEk4fQxZSTOeCNDTY03MC0bhY7kQvCpzFmkE\nnUmm+tUBtuEMw4KykKvLL174ISftKtNZ14RYoYJeUzxLmsHXSnusPkd57Lpz\nFenmqk2UnIPPUp4mwrM8eXadbF9EJS5gBpsu3xH7VYYrGnCKg4QbFSjBCMK/\nJVtQ/5gB3ZF9JE3ogHpoi6gQi/vy6lZX3UPLu/bMMUsFrn+m4HYVxjajlBh5\n81HQ+X5FYOc2AyZcb+9nl1BkWpFGZ7YAk3kSi1gOHix3Iiqg9PTftpg5bUPY\nrxOoHDIS0oDYw9dJFBUNXtR4RBHqVwd9avYS5cEVZ+OZsLQy8mAurFPOng6b\nsO1nHwNRqaM5cqBBrOyyFn9tqr5HMG49WVlcXsoX/kRIIUOW2DkAUxaelxtk\nimkL5Y71++heGMb5cBjGSOHhl0QsDc8DoQzHIBIhtWH1SNuRH4CIXNa4Grid\nhI/+4IhQVAlBLQkmFevojqE0c0uHh2qQyLqnfWbhOdAcnzjmPlwr+1e8E7YC\nhQcEWZss4Uus+agqawO7ScW5mzRryo6ddppKuclGz+WUYRxD7YSDlUkTqtWR\nmmSD\r\n=578k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG4eSyp5E0aTq23oJ8XBfEoJRpFYWOYu/5w799H+o8JAIgLYwnW6wGx2GFwBRNTtKkEg6otYsUXSGE4MWlGmeZVns="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.11-master.20190802160233_1564761901722_0.4265148965300454"},"_hasShrinkwrap":false},"1.0.11-apply-target-fingerprint-20190802160206.20190802160407":{"name":"@atomist/sdm-local","version":"1.0.11-apply-target-fingerprint-20190802160206.20190802160407","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/serialize-error":"^4.0.1","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^5.2.1","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"4e003925c3c8f7cc0e51d12734d271bfef8d2b13","_id":"@atomist/sdm-local@1.0.11-apply-target-fingerprint-20190802160206.20190802160407","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-/bM84uMUUCyzTZMMtaBxvdwLH7Xvl8TdBokwadJP9saS+RmB6P4s6g9mEbyJHWNYxOUwQwgb0kOGA9J4BysJ6A==","shasum":"2e36c81bea9f54d5b502035e5f75772ca9f86344","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.0.11-apply-target-fingerprint-20190802160206.20190802160407.tgz","fileCount":358,"unpackedSize":1329113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRGAFCRA9TVsSAnZWagAAhjAP/iKrnlttSmJc51CMVSHY\nix/GcD69D47/9M8ucfAoTgDvXtnMykaF/VZ1fRzTPk6XF32p68VT282QSwUT\n4UrZ2X9nDcVImWIyNUwKag/VUmS+KHg6kJj1zGw142uKmsluWkOCcxX0KM7t\njd6M+DDTbcZHnQy0rBnxGE7z4Znxn2QhrLuagLa6vfdMbVAYlUWaJsnwN6kc\nsJLLnOPiI2qt0CGi5NMwWFWZupe6hqYeukVbLrZpttWQy0HdF9/7W1nvYiFo\nNS87cMuWaeETwpHISuO2kxoyAP9DDPFskZOjF6yqaIDuoRvVVd2mLERTr2X0\nXzB0aJWlUTyrPhxfq03aCNPjvJtrnlZYen9ePD/d6Azkk7Tu788+wj4Ulkba\n7AWUIYxf8PTXv052IBQ/Cb2t5YV2VxK4OC0QIEpuss7iJQ43ilhQf/kl+9GM\nZCKjN9hg4rzjs+uaBdi9XAFx212H7OVerLPJjjaOcMvNO3+M5qpBtk992xqE\nUgKjB4eTmBJCkEfSk/mAG3lTTtkVKU4lPa7bwnz/7KSr1rm5NjmCn+dSfe8A\ndRKtbLRBYLygN25zx+NPIY3xtJe7KQzNK308+GLgnbxgQsUeV8MfBeRijLYK\nJIqLZS7K+DIDku8yX1dLU9jzWFTLHHh5mLvO9FiLDr9NcnGbK5zWw4JW3fv/\n3c+q\r\n=1U6w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8afl7IeylwyGrQMFb7+iv4saEO2zdzefH5/KkcjGGfAiBHcy6f6xwPoVDzqXy90VqlARh36rzbFlTrRz1jAC0axA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.0.11-apply-target-fingerprint-20190802160206.20190802160407_1564762116688_0.5920170006059289"},"_hasShrinkwrap":false},"1.1.0-master.20190802161533":{"name":"@atomist/sdm-local","version":"1.1.0-master.20190802161533","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/serialize-error":"^4.0.1","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^5.2.1","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"75bfa5ff70caa383c05df90035d3ef90ca00a39d","_id":"@atomist/sdm-local@1.1.0-master.20190802161533","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-svrBSfhrL+s2lCSWeMvHCHOPHezx+fXrLvA/5RsNNU7d/EEamF+UxAVOkvP+YBuUQ2BEuygbhonjkUpFnDH5Nw==","shasum":"6f4091d1cbc89159cd6f3d1700c86452bd01d8ae","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.0-master.20190802161533.tgz","fileCount":358,"unpackedSize":1329210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRGJLCRA9TVsSAnZWagAAEj0P+gMM9FYyYAi86lMrAayf\nNvv6Y+USsvDWdwRT+opgaDnNxIeLb9gScy3GFIaeRpz9KC2GmzUejDja80oy\nMA6fnzA/nQ9z1hT0sMQ6Dk/92tu0HWSReHfveFfOddZRvOk/U0EisbsXbslM\nb6y2G6Qae25cikRCCDLFB0V/2HQNzqmI1u/nYfnmD2V6uIVahE4Bfu8URPM/\nCh+WTMXy6Ap5RkDm9HabvAb3vijeHvP1lI+GKkIWMmZRBe60rxEF16BlGfZC\nOMwQY7GDonB4NO3nWGTv6JjTgDKQJEYRbxMbgge6WYFY8Ma7EZMtUPeWeay7\nMT2mKLnCO64R0Snbr4oXacb7i/8nx6MYpxp7b0gqwYE6zGteHcU13coiPcmp\nWQ0abJZp8yTWaa1ibKP9UuCMKzZLq8ENNRrpCnpc4wOoG6q8o3SC87lkRzxD\nJ3PEPvU9Yhs8S9gDaHMDmOTyfbrRLT72ag9nxSlYIjO7YRZGqtjd0Z5tKtMp\n4nT+poPMqKqqJ3V04sxRE/x97fUVyT1ilzfDKy1mDbf2AJ047qdtJLW/45Hq\nRy0FgmPtMWHDphs1jj40770j/XWuOxvU0ekKBN5FZZQ7vlQujxfIoadxh2tv\nF/AY4RzBa8h4AaJCHRcCoFfsNlJd98u26ePYBx/McBa3NMKEeSNrfEYs+gYB\nVzQy\r\n=VSkn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6J4ZO342iHRrs9MXXEgElZk5Mqj5PT54fAWITHeX0iQIgCLReb1Q1I45NjKR7ZerpGIuI4gRwQ3tKeStg861y2Qg="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.0-master.20190802161533_1564762697990_0.7308351452765265"},"_hasShrinkwrap":false},"1.1.0-master.20190802161458":{"name":"@atomist/sdm-local","version":"1.1.0-master.20190802161458","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/serialize-error":"^4.0.1","@types/sprintf-js":"^1.1.2","@types/strip-ansi":"^5.2.1","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"^1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"75bfa5ff70caa383c05df90035d3ef90ca00a39d","_id":"@atomist/sdm-local@1.1.0-master.20190802161458","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Wx5yIBh9s6lEE8WyOishPSqJTLJjxaLWiO1ipaBumNihP85vh4RiJT/6wPzGOBqvPDw9+IziPaj5KrGogeZZWg==","shasum":"b7fb9ccfca8a67f69db86a3081bf00554ec9b828","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.0-master.20190802161458.tgz","fileCount":358,"unpackedSize":1329210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRGJsCRA9TVsSAnZWagAAYCUQAIRCfRdiGeuyDkP5zLcv\nnBfcU+qxP0le1tvPiND7L8HpkYx3JjXoNWNyxytxXp4cpYL5x1vzE55lG1tc\n5KQQ7nTtW59si+qQR/nPJde/w9w2WV+kg8NKbBr2Tht/3R/j/5T17VGna8FV\nJs9qpF3zzIv4MCBbOsdzZhVlf1HvKJzSWEKEq+G7vn0THldJRZz0o4ky9f5u\n9oYdyPMJQ+l/uGro2xGspQFkH/EaSG7Kowqg66D75ipnZMU8i6p3/ardOEgt\nHg9PD5qpGC1tIj7nbBZtwXAjgumK4hVk+RTPdurbsAR0AUrRpXx1/o4tR9ji\nZgm33AhPz8ZKFuQHZUbI6B/vAwpqr+7QOzouFmd3cA6xzbdxfyujy+PyQvQl\nqCQTlaWzlKqFpqpFQ1Rmb9kzftmkafaWiap+cSsWf+/JHZAJqEGFgfcUjv4f\nkjgq4+mNFoqK0Z2BoE9RoIYSADcNfNW08Nu0DnS+jGuLx9i0KNQG2f8ZGW7i\nMttWwdxe+oAjJlaL2MZohK7o7vXRacVkOLuT2EkG5Z72TdsmMWnV9Q+SDnof\nX9tPpqyN67Qd8Oa3+mO0WHiu36cMJwoq7C96i/ylIJfFLKY+EK3skEnhqdOz\n+oBP+QcNDfWdQ2sEKjvJtt8En+ZG+2eqnQS8SAiz4SvcFxuku4UrWG445efX\nS1CZ\r\n=9PWT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+IfZcecE04/C42ETrs4SRNhaS0P9bM1A+T7XCF8n6qAiEA9R6I7gBVu9wOvxQFcFcPi9qKXVTLyyHljWV8aPje1E0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.0-master.20190802161458_1564762731823_0.5548817545874127"},"_hasShrinkwrap":false},"1.1.0-master.20190802170815":{"name":"@atomist/sdm-local","version":"1.1.0-master.20190802170815","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"5e1039cb5a56d861057e29d2abcb1ffd06aca8da","_id":"@atomist/sdm-local@1.1.0-master.20190802170815","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-IdtdS+++aNYfMZxqMcIfVmJzA8uDUyM5xNqqRdxkueRBeNkUek9nwb9pEEF9Sr/R89vXsgGJav3OrF2DdcGTjQ==","shasum":"d6a5b47b6e9aeea018190fd9aa475ce897ecfae2","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.0-master.20190802170815.tgz","fileCount":358,"unpackedSize":1328893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRG7fCRA9TVsSAnZWagAA7UsP/jYiyupzCyCT9AaqY+VX\ndVSMUzyw0QBAdxCIepvysQ+j3961CqwJJQnofV9GCJog/6/DSeEGXkNcYcv5\nHjv/L/sVNdeGWYetaTirmblQj4+9vV8ox9m2wjaw2ZARLnIEJieENwAjyeQF\nN8c96RMCvJIfW+FwzlbnSsC3MEpyy75Ky3F2qkzQAfkvWfXoK9qAEm9qGvVV\nrP2xcIRMlqMmTFGIFP/NGMpqJyux3K6JQPJlq1T2IWHik8yRL+Bs/Kf3gfa8\n+brxzgQXybIrWoIFMzXuJGUpe2Ot+auY9TIk0l/yaMSZCUD8EoI3ta+vDRSk\nYQ/2PEnhVzgKRAh/iYIniagvX83m7fxWwki9FW66C3hIRdS6zWrP9hAfw4YL\nP9/gqxjzLj+ImC9WBznHofwjgKx1FIuCRJDWHcrMD5V3XH0XdJlY/QPxfhOO\nLIJn6T4or14Ult2CW05UAyCRQi7V3VYmKYzWK19bTno6QZv9b0vrLJQw642/\nNAnanlIQEKCaoe2cn/FyLK2DJVjeTN1APZxQuHHp12U/Hq6oap+x/Jfkiv0y\na/QYWGU9RnzI59P2MELnMPJGGSE+kdNhmHGsrIM02LfUgGOxRd4eigPSysU0\niq0nurX8TcFw5kaUF4N5UWri6k1mhkqm4vzguFDCu75IhfOEkSjRBhE8yiUQ\nBtc0\r\n=5dZL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/Crigri/0L5WCKiyq6A7SwW/BC+aYalkmbwMnvcaH4AiBzJo/y8gbuGfM5qlAEfebC10zXp9HKZzRvgsf9n1dhOA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.0-master.20190802170815_1564765918933_0.9058432231670337"},"_hasShrinkwrap":false},"1.1.0-master.20190802172217":{"name":"@atomist/sdm-local","version":"1.1.0-master.20190802172217","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"1fa81c866b36aec84d6ce835081dc3769551c99e","_id":"@atomist/sdm-local@1.1.0-master.20190802172217","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-2bC2uGB/F4DHQ+FGx5s9C+ths5wHW1o08pvQTZhYNOk7VQy/apDwFuXyHPxNiNRceRu5GnlEfTg9V65pnSj+7Q==","shasum":"1335b6c370ae28db986963f292f2c419c533cd82","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.0-master.20190802172217.tgz","fileCount":358,"unpackedSize":1329081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRHIGCRA9TVsSAnZWagAAtYUP/i0HelOBOS/alEPeaARk\nPNkYiaWEZNpdQf0Z5ip8Zn6lEw8/SIgdA5+qcocPhw3dp+ymG3mFHnyU3dKB\nVcU7z2PoqpallsWji6EhJ0JaFOxxJc+8HsedDPMMOPbhYs6KEujc5+Fa9ope\nGFUs3ExhRFHR9+MsNwFE/nwhXbHQwZAWmwmfOW5qC1PxjhCiBnR1hzKNenNt\nGAvD0/Nfd7x/v5bZLMnyRF1uIk2KNy80V92uImsMF9913zQnzikVs1fiiYJO\n6WiO3qPrZVL96QlaI4EJByv7cqsPDVl76gKFeFim9FT5oRC4ELQW3rfjB5Eo\nZEiZxwHBe/0iuo8fh4039U7BuUnHJtHyl0QwSpFXTRFJD8j/2kX0ntKP4P13\n3j3yuVl1A+DOWq/SisqYW2zfWrGpWkBHTTUnBB8GbP00Ubjp91sp90czn1U1\ns6kT/zyNSGXHeX9DqEwvYIIY/XM+kanEdbJfzs32gbX3L3aeiRAEf9iNiPzT\nLwCeJQ2iqS+rJB7GprJJCkjIY8kwei30iIJ/vlQ3jveOAO8q3gocKPiRI+xz\nkVeg+7E2Y9YBIqN2mUYEd4N488VSRmxh7c69PbxwFh/lvMBmxcYCXE2YH4BF\nhKgCK9jw41+hTKPAbgT9JQDPJTzwoIwyaq0mFfK1nG/T2jDANoBz8x/gaFaB\nTdsm\r\n=Ykkn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWN8ti7mRgldoNV8uL344LZK3cjMvvRyIIjtErE35E+QIgUqz3DgMFN3CMWC1FXDVeg3RDaf4O86WahSFkb3MK8Vs="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.0-master.20190802172217_1564766725338_0.37140717272590384"},"_hasShrinkwrap":false},"1.1.0":{"name":"@atomist/sdm-local","version":"1.1.0","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"43e48f6739c2886d2580cf7e08cd5a29656f2098","_id":"@atomist/sdm-local@1.1.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-plt2kvOOp70Bz8aHjxO4pMnc54H8rAbwAXD+Paf03wQ8SJ/7xXmiaYYxpXqd+2lLzIQjC7XHEM63hvDfnrWneg==","shasum":"f6df88ccb550d1bf5d7dc5177ac7bdb8154ce584","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.0.tgz","fileCount":358,"unpackedSize":1329059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRHKpCRA9TVsSAnZWagAAe0EP/1TDVWUO2pZvJp06TuVd\nWrQb0Z1VQCmRQmLVft+hH9Ep29xb81QT4mcMyIE9l8atdhhweJoQaC+hshWx\nrkyVvEi9/4sxBd7MvVLXPhYTE/tuIluft2YwuFam5l5oPSrE1pbhjmtVJTWb\nOnavfT8boWtVSIUNHjn3NkfBod/U9vtCtNXlRlx3bWd/Qa1OTM5qDQ9qOyIm\ndIangZ0ajFIKeS7HrwyzqGuERvJxHjrmCuuYk/tBhRUKWWehjrcl3KDm+7fe\nyULViuCwM2YlIo7xoJ9Vo8VYkg8veg4S+dQt2h4ZwB78wM6dDVmb3uvvc43T\n0dB0yyYSThS/vTRdkEUbRnJ14NaNS7H7NVQZIETfSIUjjzI9UPrb0mmfeOP5\ndnWCNgmqmrRud9IDbPzI/FjPVXcIaV6yNHRO6JQ8ieiXM/GeImks6I9ahX/A\njglXsKxj/XUv5NcWP2VVyUqnGBUxh5T8pBsqclBcsN+2W61I+9bygHlXnTjf\nnAcmCXvWBJfsbUmrFzy+JAgYO3h70xBrsnwcQHXZvNQo1BgEiu+07DW3gbF5\nYssOLW2Cv2PI+EekCPbh6nmlJQiNISFm6C4lz9F53ZQ7hFWf3pYvQRg10lU7\nytnE92g89L08sJgYCBIf3Y7e6CWCNdPaPgdwAXW6Cqp46+LDSbddHd6eVNGR\np+TV\r\n=wVKv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFJuJ/q0PBcak0wgOBnGVsKtbn4z9tmHEsZ1uvxljtNJAiEA6WY5Rr+2km8fOW/iCCZ82z8sLH4M54vHyxWPBzWf3hA="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.0_1564766889132_0.5865663644573285"},"_hasShrinkwrap":false},"1.1.1-nortissej.just-a-comment.20190821233539":{"name":"@atomist/sdm-local","version":"1.1.1-nortissej.just-a-comment.20190821233539","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"df628280d8cf8556ac2671ecb0ab441407d6990f","_id":"@atomist/sdm-local@1.1.1-nortissej.just-a-comment.20190821233539","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-wUUum0Dv6lBnXbJKL/WVkD8lKC3fqw5KgimbpYXXDUKWJ07bD8NvKXTckW3UFkCHWDhaARL78Hw8Ga8oipvmqA==","shasum":"9891c8e3eced50a6d93f0ee82c21611f792c4d47","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.1-nortissej.just-a-comment.20190821233539.tgz","fileCount":358,"unpackedSize":1329369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXdXiCRA9TVsSAnZWagAAn3MP/13b/fY4FTylKsFE4foz\nmZeSQ985FpTPRoEOFKGg4KcmdDv7gcxeFEENBwkfyq0AKf+U1WurZDbPq24G\nX5F+iBtZg0tYZMynE4nkbUoJXwkhTyJqAq5zzCmj8xshGnumf3TMH4VfRUYc\nFc1/zzG1XgyJ3Gca4XXwLnn/vV/BMegqufbAyByjqjv2GO7u0TcCvFyXk+rL\nGPUgqm93DBgTby2duVKk4YE5/02HHf04ZTVfbdxvWyo0MD5lAw+BEwDo0Cyf\nJ/p5W8YsJ3V3UVXZW6hQJo0q2pp44Y8scPJpSipyn4nikwn1Vy7PoPMqQnRb\nHvT77CBKsbjrnPI6fE9jrw/qT90x1Ev+kXe5R3a1oFAeUArf+cn391+tPBk8\nZQ6oIKjqMX65boSDG+/xAF9lVlGcoQacS+ULPoq3ZTx07xYM/hB7xAjKYLUs\neisV9r6MJa1vSD3XmCSR0J1Q1joC+knpYwxsK7EGdopEX6x4kBR8HwzYo5RN\nJBy1lsYS+xWnYbYnW/7GlljtBsJvJtPlKfQNw/vonxcftoAjzjnkiQFX/v8n\nVncEDHk3JLUwKtn6uWZiXUxLxJCUgW8P2OXP2Dk0bFt+e/132Y+tzXIys2jB\nnQNQAIq61eim+tPunBygZrn551+b4vS7jaYVStImVOY5AZV5oX2BwYd9Xmyc\nwey1\r\n=Ljy9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHXMylWGYxGCI4rxlZKnNIkKxkuuS+SZXxJT8Als6nilAiAlqbj0EOySEVws79NUjCeXs5imgxlMaHXWBwnzHSCz4w=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.1-nortissej.just-a-comment.20190821233539_1566430689807_0.8705577513611453"},"_hasShrinkwrap":false},"1.1.1-master.20190821234932":{"name":"@atomist/sdm-local","version":"1.1.1-master.20190821234932","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"db31c91e2dd7e1e5662c9abf82c09d343385f635","_id":"@atomist/sdm-local@1.1.1-master.20190821234932","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Y8kfHG7wEYIvDUcapaVN3A5QwbQg0XYGxgnEp88IsMgd9nYsDqLfLGkYHv9mlnt+prEOVTsueWttpGcTEIbFIw==","shasum":"ddf71779818b199f673ca732be9957e7e6ba8dd4","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.1-master.20190821234932.tgz","fileCount":358,"unpackedSize":1329351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXdkoCRA9TVsSAnZWagAAboAP+QEbZG37OslH7jBtguI9\nwABkXobF0LZHxSYq3Nozep0PozSkpXBOG7RF9KdkqEGbR2D1w/co1f6/Kpl3\nZ6K+nFsH+iOqZzWodnTDIyGILeZnmO28obhblnTuJg5NIoeUwq9waP/TUmnN\nHM3UT8qBi4sNPRP7ihqVyijfCXCAaG/QRlm2FMosB6JSnL8BT+9XP3upFF86\n4EVqoOzUYEo6dRo45ubjozCP7hgdF/kCsxXrgyWp+GZH4fV3hNGmk5Lx11Ss\niSLmyywwZllWaNF61enH8EexQy37XNg5MctvXF2NWweSsUVgyMUAKkVfANuD\nTPx0FASQCwAsinAn/7KXw4pCFY3LCLURSY//xBw8siuGKrggblOxjeluE9Ru\nkG6R4xX8Lbqfv6n/8CsnqRdSbw+pW2Pb4gkWqkOaWwS5Tf7Wcb+jdJ3OsZWp\nd7p1q68GfBRTQIlyYPaVfQKcjnsfb8exO5Imd9XqCmpr3uFP+akwQqDOPVbX\nouJaAz4HOEFty7Y+UrexnHLVN8BlEVpm0YyIyfO0Nb0dPONgzgZNeiaNSSi+\nrLPIn4MtD/sZ4bja0Xw9af0s+Qt17xA0/LwPH5bo+UOswy6Paus0laKAulFT\ng8XeYmrlmVAJz4HJa/AqgWbUjkchsa/rNoSojFUDmVX7XiLxGbFaW8txZO6p\nUz7z\r\n=qKRT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiOpISsT6Jh92EZTXd+9Uly4UOUXFxvr4iQM7jOaUILwIgBNrS8BfOdpe2vNYzQzx5h2McjMupCj+f5xHYycUwFm0="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.1-master.20190821234932_1566431527705_0.3774754025266194"},"_hasShrinkwrap":false},"1.1.1-nortissej.debugDocNotFound.20190827214849":{"name":"@atomist/sdm-local","version":"1.1.1-nortissej.debugDocNotFound.20190827214849","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"08288ddc153f9e288527d4ca31e1406d45801a2f","_id":"@atomist/sdm-local@1.1.1-nortissej.debugDocNotFound.20190827214849","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-SmM9qat/esr9un3xQDlJLk2Mn0xFBCWJf5ns3HZoFqlNIdo2FSEIzKqRcAGma4pEUBhuANwWpk3heKTtpsqZbw==","shasum":"1cb1be2bf29a6ffd592a5fbac9f92ce784415b8f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.1-nortissej.debugDocNotFound.20190827214849.tgz","fileCount":358,"unpackedSize":1329612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZaXjCRA9TVsSAnZWagAACpQQAJdxT1eHgNhGroKuekKB\nW4mN8D+LZNZiQlpGDWRAr2YJys40gqX7bKJHRFT4FbdjRxoEk0cCaF8tPRdv\nMqifopNjlwjM2xiijEpkfs2rxsgvlJufOWae4BCO1ox8Xe21rAs9yYK75deC\nke+c6V6coZvrMHSge47Y4JI1KOLjAnfg0g1L1yChaZgtkieH7N8K+dNKrIKD\nd9YCjrRCdx03fMOybrBicXPjtsU7aiTnT+nUQlHr9nWcCUew43UfPU6yT1g/\nwfDbv5oL1MmKyHqfVs/JNM3ZpStgW+m4PTl6mV64+dRVUZdOt3Q5GDdKQUaE\nScpb/wzU7HaeohS2+ECbBvtcf/tNoGmfeBkXaFLVICbhfPvbjF3u6GwYJ6nu\nqt4c0CvcUSnTdTZXIAi/91eAr7Ccrs43iPfI9fCUQ0+DqavZyd7t+yixlBrU\nV81LUngHaNn7XZgNITEQcdi2wSLaPXjVeaKxXjDaKqPgDlJ7FcRudP+0i/Jc\nOfjPT1DtbVFtMytwANfhJZ+e5V8g72FNI9l64kNqVKBgfAQFJc66EDmDP+F7\nGz/u/t5bOlMt9HjoTRxWGmZd99NTzIgNBJfl9jqhYnfbHS/m3XC8cHqVN6vP\ntkJHMSY2PV7yy02sznhJSpGabnxt9MzpKhI1H0cyU4BpAcFioPGYG2a/obOZ\nM24D\r\n=aKCu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBY6U5l3YwoG0a7qJqK3jnvY5S1b1dOAzpSXEiqGTUqkAiEAzmS5S2RJJbbJZnJe0ByWrNMA20fF3w9JwBQFe05JJPU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.1-nortissej.debugDocNotFound.20190827214849_1566942690965_0.5588765052133731"},"_hasShrinkwrap":false},"1.1.1-nortissej.debugDocNotFound.20190827221715":{"name":"@atomist/sdm-local","version":"1.1.1-nortissej.debugDocNotFound.20190827221715","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"0698add9fc4977026a8ada2fe9c997ab90751a77","_id":"@atomist/sdm-local@1.1.1-nortissej.debugDocNotFound.20190827221715","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-G75dx/cKqx9JH3IICKaxiAHRU2iat/gw3ws7hZqO5JnAIKhVxaibzxDvMUjPjsJLJJ67ab8wMsLkijrk6ph6tw==","shasum":"d1168f5270702a5cf6b85fa4caa40e965fbae58c","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.1-nortissej.debugDocNotFound.20190827221715.tgz","fileCount":358,"unpackedSize":1329323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZay7CRA9TVsSAnZWagAA6l8P/A9PKHmUWqZh6Ka3PV8q\ncdFLwi8VAkUSrNKkMaq5dIaZkJGYgwURwgAIaRoyk6PtLBexj2RyhLkDFKeL\n7xxK4gaWWD+1DGZ4t8ab3UQFJskiRT1XUY/bS5Z3ioZBRM/Ps/69MPGRzCqL\nIgM7NbtN2mVYbwwEx4WXO8/lFq/Mu0v8crc3Oj0W20DjhJJL6fetZk98s9OW\nr1FaHe1bgRXDL50Za9p2DfHf9EzFZshd7rLU4/ulvYhWpl+mkdijdYpt8I4m\nrt/75PmmJPBKHCDJYzekQOKMGPWUuOTiOcjE7ku0ReMiy3BFPNEmKu4DydOz\nUPrM2ue2sqsd244kvWu8WzH8j+yOa282CwtLLJpylg+wZwUd8XxcmP2f93e5\nWHL8TmRsfLywwRQOzrsP3ycK7hEZmId3Gpy6ej1z62cxoI5+udXHmqVil0Cm\ndtQJ8a7MSjjGGK9KwE7Yi8ErBC1KUwIGj1cGc1wRw6XWE+IT9AocU8jV7UNc\nL9WyhMSQOt+H3VdRXJU4fN3tWCw0hPiVcon4YTXHCjRIZNP9iU548PXtmoQ/\nu7eIze+tLpNhVOoU695yJ1U5Rq94YKtea95blzJxpHm8JXVOzAaTbk79Saai\nNUoPQRz9MuOBwfNLrH58ZFuJ8fLdFbye30mI63jS2QHKYQEFAPUPsaWwsnPt\n/842\r\n=VPnW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEO83LKfbTHm/EqAzI41eriDw1Rsnw0gj4mn5RLO50AjAiBAiWacQnXZMH5c2NR7vyCpUtB38cmW23nqaj8DjFNV2Q=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.1-nortissej.debugDocNotFound.20190827221715_1566944442957_0.8566405031238122"},"_hasShrinkwrap":false},"1.1.1-master.20190827222150":{"name":"@atomist/sdm-local","version":"1.1.1-master.20190827222150","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"b9bd1ff114d4d793785ca092fdd291363aa2dceb","_id":"@atomist/sdm-local@1.1.1-master.20190827222150","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-pT4ByZ7QQH7Obw1U4iAurMRHN1s3lrpX/n4eaP0ZJZwfmvADW8oY6JycX+OKHvViEJrzDpWxIsMNfZqn+qvwKQ==","shasum":"74b4659c067a485d7403a92573479fd44fc95a48","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.1-master.20190827222150.tgz","fileCount":358,"unpackedSize":1329303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZa4qCRA9TVsSAnZWagAAgUIP+QCkhwDxqCAFEk9hjgc4\nw3r+mpSt9ue7sXQJNtP8R0oIidXLhyqkjrcTvVGEfLD0hF8CbuWCMf6nHhRT\n8cBRf3ujO4oWoyC9lJFlYa2yJwYS/J1jNx89qWPnWZBW5ZYx5piv0z8uGG4l\nLCocmWIKtVOOyIZxVW7URIuHchPY8zQv+Lvi40AJU8tbhVNMPNFoDLPqgIxc\n3xxnL6jyGgObFctJS2wj1PnvvLJHBh8wEYYp2naFpO3Fvhk/Dn/jkbxL7n+c\nUeqHB7WUrGOxAG8w6kf5kRJMpyQZlBmvrwMqCuTEq9IZ6IkqajOqA+dd1RGR\nsaYy7qDjXwROSvGk8KW6P7f22fpEIGxfqc+g25Xhx2Q0IoPsdZkFb1Cf8ma3\n20jVCGt8Ezd33d7hQ5sXKfaCrc/HDfvGlTxWcu+E1XqDbL1NQ9tfO2sbtZWK\nV0gyrG2znFaLVdKdSVdWEPgcZYMjBC2p90+fhSkXUrccdG/R8WvkUlD8k/+g\nqpNWtLcikIFCMnW51HpEWNHw/vKrlS0bucmxxYqwzJZF0riml7tf2WM+sEZc\n47z9z3v94uzxQKflWEO/U6OcprtH+q+Ceq7i15nfBSUHIuZd/xELlBAD5ay7\nRQZlr6AK4VCCvUrxaOHyRTW3Q7Oo/Lq4lYdkbmKFnn2XsgiLwDL69mSf0DAr\nDjqb\r\n=i68W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDS+qOEYVZi3f+QKUUQ1ILqt+99xb7xMc+PGtYXVU6BRgIhAJO9W1fAWvyiuZQECCDwo088PrGpsBss0grU8neQdW4a"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.1-master.20190827222150_1566944809333_0.3962627929434681"},"_hasShrinkwrap":false},"1.1.1-cli-deprecate-remote-108.20190830181314":{"name":"@atomist/sdm-local","version":"1.1.1-cli-deprecate-remote-108.20190830181314","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"f3a3a87670bf784a101f2f7a9e451cc5c88dd3d0","_id":"@atomist/sdm-local@1.1.1-cli-deprecate-remote-108.20190830181314","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-zmBGLQFcAKDDho4lqcmJYkKGwba9Gug8Jh0TghDsAB6Dl6jpXtLO8OA0tjxDQ5w5ZiAcE02VBgw/mUFJu9uqfA==","shasum":"4245a8a25234d6fbe616e7e83617f5e136d77e2f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.1-cli-deprecate-remote-108.20190830181314.tgz","fileCount":358,"unpackedSize":1330133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaWf7CRA9TVsSAnZWagAA5Q0P/14V5x9mkcgFf9L1R6wG\nB4Z2ZWgE64Hr5w9c+By00yUCFnKe5siyTjbY0wLv7dX5YEEwrkaJWbFu6ikf\no/2sQLN3NciP15FmDFr2rLdngnzaRH8JAR9yGGTOowltxNUc7vwgVAuNTtbL\nnp2Xko6uCcCbRsDkXEiO1zx9w27DCLODsvDzOlOh3fbps4XE+EyfIDau+kw0\nCqQzp0xP5hwlDV3G222D5dZuM4Z3dT3Y0vnG9elKQIbf1YH/0QL9bJsQFB3N\n2+1+vQ0Wlj+Nx51scpLj4pZf/+55g/YHQSijw5m9l01MqOWlh5xaZHVafhT9\noskezxwgZwMOKoFtjrkWClVLqhMrrSW5Uvrw7H/4RagPU50/obHzfZt6VBOq\nysRY4Jd/qpsd5BN+LaZFmqWm5xVsY+/muhG2dnkprh5W4JYLnR2Qgqd6E1Xu\n/fzA9HjV1/yDqgn6Wz6IqMajS3Ic/RaQtcI2CgxevyCFCpLkn0cdtnlHNtRh\nWNRo6b6fPqT44fuIkiMKCInnEL9q9TsVh7xLyC55nS7DKeYTk5DLVYo9q2lz\nBlG8tDzDdZpp5pHkBkU7PNbJIaAZn1Ku27jC/yWwxu/UhjSY3iNlURZR5m98\nCOIMIV1hFvyR7rJTyD1/eOlin9P00soHilcbFwp1W3kmRH+hAi3Sj/XbdusL\nacAB\r\n=eiDV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDUAdutba1uhRme4zbHKuMQjewn0hwlXolWyuaBiwkuAiAQQSfP3yPl1DVaPLli/jeIAmDt6rLKaDPbkfs0QKWOyA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.1-cli-deprecate-remote-108.20190830181314_1567188987058_0.9913262390861988"},"_hasShrinkwrap":false},"1.1.1-cli-deprecate-remote-108.20190830185618":{"name":"@atomist/sdm-local","version":"1.1.1-cli-deprecate-remote-108.20190830185618","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"b33893414329fad4733883e3bbba554536da3a80","_id":"@atomist/sdm-local@1.1.1-cli-deprecate-remote-108.20190830185618","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-LR5P2e6q1DePXwmbf9B4lES0cbjU1S+giG/pDUd2VPFbv1zvFmL8rlOJBsgtttB0ktQR8M6AgE30/NWJeDPd6w==","shasum":"33b1fb53564df900aa8e895316a2dea30f9340f8","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.1-cli-deprecate-remote-108.20190830185618.tgz","fileCount":358,"unpackedSize":1330259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaXIKCRA9TVsSAnZWagAAd7EP/14oU6pQTLjTA7eyskdd\ndwfKeew6cuw2EQfInX87P98+6jD0yq9z/kPMyvwaNcgv0WivxczM3DlvlGa+\nuai0QminYoyjxox+HOv8vVVZwJZwbnO0ecJykCLvunrYjXqNDJndxLTuk9eT\nKU/K28RqnV4bPtQSQ5hrQMx3rRCUG2zEBoQLomMSez3ldYl7cmQ8xGOo83xI\nXYzOw/3hzDOEluzk4jcMj9N3VDqpHesLYSeNrrBWvYD5Sf/JBFzQetotUptH\nQqKnV4Vi7oqE27vvO+IKLzYWihGqwtyu4nixdB5rjjuroEcBeJoFjrl3h0UT\n6/sR6ha1/zFcCxO9YazS20/HUa5alHMOWuRCkcgftrwhdMcCrnvb6Eqy/MYT\nO/wnB9pq6hPBGe3U2qqGKMH5K83GUoLpqR4LP13SKsNmz6dpf9OzzUiTmXwg\n3fc4s/tTs68H3JGfyLu04czDQD+V52GL1yvWYceFZnNlJySriY11UUogCX08\n3fe3BE6LnGwYZyOqB3z7BIyyepcEEHcORhrO8xJsou8KMkoPdzB52fiDZwxK\ns46RL4EiJ6SdcajwCVDZM92VMhu121DhFpHpPliWDmmlVBHoGPXcX18MJPOy\nHdA1uqiYsOEMJzG43ES4sLwrcWJmqBHA5isUwdzx76UvE/K3rp8iZim1yXh/\nECOq\r\n=fyCt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGaCqvVwB5Qqg/8tMUjf/JSxyR2B+TVUA7/n+pwXjGNtAiA3CCUi49v5+wiGCqfbdtUCsnvVP9aiSJy9MvP58yDkYA=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.1-cli-deprecate-remote-108.20190830185618_1567191559439_0.03631408506667433"},"_hasShrinkwrap":false},"1.1.1-master.20190830194854":{"name":"@atomist/sdm-local","version":"1.1.1-master.20190830194854","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"ee0b661c8dd5450e93bfb9fef5a7f76a7320982c","_id":"@atomist/sdm-local@1.1.1-master.20190830194854","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-PLNswTKlOBOZd7YXfnibw0EizoDuRomdbc21+eV+a3Z/GQ/jNp68YENH+TIfdwM00tfaugz1KckPJptFF9BEpw==","shasum":"503c4ff140f17efc7703258515409643383a4e3d","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.1.1-master.20190830194854.tgz","fileCount":358,"unpackedSize":1330350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaX5wCRA9TVsSAnZWagAAq1oP/02j9Ycisr47ZqMh6e3W\njr7d3bT6vBTAuA1+Sw7GvmtM3PTef8pRgcVyoKFR4G+xeSfDxFLCDhyysiTt\nqhn5tPZyAs9lBPIHJ++sgT9ardrO2sIbrazl97xCTcnkSZ3T7ZJJfj+X1l+d\nwuzPMoc2qfEWwz6lx2vGGEM1WSlh0VHLnbdgNMg3Zb1Vlew/TGlwHuURr2BA\n4LLlwH8kEh4RrxXBEmf50LgBCI0mN7y83Y6MucMsudtGiHb89x4GaX21bgqt\nsYBIhreID6xhQXJelPBKKe9ghEQTyOIW2iBD4SC46gsPkaPcdLdCP36pjI/5\nmq21mblstk8IQcMp/l96qc87JgyRj5qb4zx3GxFA23Y6hwIiOM1FQej6PTI6\nP2WkRfwD9+b0w+YeVDNkmYxs0PGbDnH71D8aOsgBz9IFMeTYYl+KRMEGyDyK\nIX6INev+QIKYrfGB+pl9u+hjC+Lv7OMkLOlA3KzxH4NESlf9z1tw3UlTa28B\ndLiBKBo5tkPhYa7PghZxlI+ogRRvm8g+vFun96ZTpim0LY82wPGWG4ByAOkp\nq+/YsdLJ+8qjdZxEXqbVpNe7Iwtrt7b/N8wirGa2teyBL3aoCKWudMnJmRFu\n7YPNRyq4LtauT04MLdY/JNBBjHk+sgFVBIxVvRJWSHh6pgOn2MwgWsJBXr5L\nzENP\r\n=7Vw2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKl4aCSplLNAClOyYeccrjRfKcD+S4mt0iAqyw8+kIZAiEA4HfEIHWXGj9JfLSa2Tl+Trn/3ps0QoEl9I9GgRaEin8="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.1.1-master.20190830194854_1567194735617_0.8371407772787924"},"_hasShrinkwrap":false},"1.2.0-master.20190830201514":{"name":"@atomist/sdm-local","version":"1.2.0-master.20190830201514","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"233672fb0b2ae7c9e0b26cf05060335c28ef02c9","_id":"@atomist/sdm-local@1.2.0-master.20190830201514","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-CaLYTL+SXXUP+cn9LcIj+YZm/3K25ucEODkdvDi/RM+MswyqQC/OUPh9AOeCVlw+oo6OtC8cJ7luxTGSYHIz+g==","shasum":"d55bdaea29f5ea30ac5abbf057b93c1782fcc53a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.0-master.20190830201514.tgz","fileCount":358,"unpackedSize":1330350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaYSdCRA9TVsSAnZWagAA5c0P/0l8evcBJdoUcWm9HJXI\nIjUD2Cjpj9Wq4zxlB6LtPsuAueXMXQVe62D2xHhgKG0bO/7qex4j3dNOaeQe\n0BA5u3bBupZhyYUfNrEFB0uJzkD2Lp/rK+wpxTsoeiDywQdptqgI94wgUB0A\nV/Eb2+eO5TvGr5pIVuSG9f+kj1QtIs238X4dvs2I2wqtoo9JxnsDLmaIFkbv\nsyi9yZ/gvTPaGPbT6sG7UFVl4jQLSH4g81zmKVxwZyX8fVeis6lfKteWWTqb\nzSM/95zK8EVVylJ/TwRJ5KLIRVHTgvdkPYAjCBy35W2evXt+P89si7+k+dNa\naQnwib/j++0l8c/Fokf+RohC8lwrblDmxqf14SR+TkRAfGz7woTZIerrb4tp\n4guhTCeFn4GqqgoIlMw4Tc7nEM+gpXG0768pMIkjtNU1/qucSLxhy7Bv+lWD\n0g51fhRfCa/wyC3ZYYT15qzK0Sfu3DMMAD1t1hTLVo1ubUseS7l7BTF5nrxb\nQvaEOw5D2avJOHVTPiL5YocWKSIIUeJh8BoL7DX65C+0+CqM901oXcZhrSsS\nZaQjQOAV5ADz4IqjRFzf3Lqqzz88yXzA3dEn9J3bpv9vUPagNoFmmfZKA6aq\nm3gcbLsU5F4PfbYzMgrC7CfucF6lzTUpkvfzhOgEEmVhN9jXCM/2nMMZlasU\nSjtO\r\n=5hPF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi+vNVcQ17cGBKJQ/Q2/nUm/v3C0YzfEN6TMIU4F3rxwIgJuHrAKjrJp5xcaKP2EpJ/raDkCha7PZhALg8Qa4+deU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.0-master.20190830201514_1567196316719_0.04579367585441663"},"_hasShrinkwrap":false},"1.2.0":{"name":"@atomist/sdm-local","version":"1.2.0","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.18.0","typedoc":"^0.14.2","typescript":"^3.5.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"823fa8c4d3ea68a5719a8dea134b06f54dc07840","_id":"@atomist/sdm-local@1.2.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-50jZdP0PZEkJyl4igKH6EShj8NO+QhIhG3smrHJVOyevYytL7m/QqnaRKtWHc8M3i/69vWMvx4Zh08yImNmCsg==","shasum":"b796558776a17ed713f11cf59e61e805b2d4029f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.0.tgz","fileCount":358,"unpackedSize":1330328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaYZpCRA9TVsSAnZWagAASw0P/iW2NGJPpAPc1PR0WgsE\nj8wv3nK5ybqjGggz489Xa1X0qEOcfkBEzspjHd+eIaP17uetH2eU/GgA2HHl\ntuijyVEmIbN+TSaWgsztJH9ksRHHzXw7EO+IAqZ890xJIzey6XnUje2Npvam\n13+HAFQ57WFu+wYKCruAgCRDQhXSUUMCiFvFDGr0DI/ZmDK8enmNCWEoG35D\npKhPlFeKHgyMM4Hky1CP3apIcCmIOEKx8Ajx6J7cuZ0co3aEqufeyarLOJc1\npgOpsPhsWt8BCPeNLB/AepTFW0kH4YKHmQfs6brPQ7ZFSJZazrKiFOdvt5G7\nQJNQEXF8TzDVykwTdw3hJReQfthdsq5eT3RkJIMveCchhJ0RGMDBtjLmTQnc\nOZMiCOi0Fr44cO2g0FRmr4ZQ0zvfiFf6md+Nj9BJXWFByecb5D2W++5dJ83f\n1cKixHd3AV6ZcUjjCN3EuIVIIYjCuHol9GBpfZM4pbJTD0wQZkj0WL44Al7K\nc6r3yrVnSqOi9yAHy7Q1lVi2TOEeKZUK/LLGj16FuT/pSWgWYCZ3DtOcMKfj\nwkvDa2r6iErdp0ICP19I5G6ZD/2aAl9u7xYxcnPgemo9QRWLLGJQfIPSpTso\n8vFTFJNsLFGSa71Ek/XkwFAOJLFZtg1JGE/5rLU4hKRWdUkisV/ASTVWcesf\nLvRl\r\n=SdRN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEKElnh9b7OjXDXB5m8/KdfY2PgTbWvtF+wexgIvvmNbAiBJHtr9EIvBHPzJOXqSZtDUyH94eatIaVlDaCJ01bpQQw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.0_1567196776295_0.643237351584077"},"_hasShrinkwrap":false},"1.2.1-master.20190904123415":{"name":"@atomist/sdm-local","version":"1.2.1-master.20190904123415","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.2-master.20190903184656","@atomist/sdm-core":"^1.6.2-master.20190903201907","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"9d033f63b5955fddd7abc9ac5290953a03d7e6cb","_id":"@atomist/sdm-local@1.2.1-master.20190904123415","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+F/3CIe2HmeMKulq3bKCf1fczsH612AILwU4X9EbW3HyxpFqY1k6c2uzqLKQ4l3Bl4c0h2BlITTE22S+I4ccIA==","shasum":"283c685e03e9d51f8f8a7d6ab1ab1a88c1d0a8c3","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.1-master.20190904123415.tgz","fileCount":358,"unpackedSize":1320999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdb7AxCRA9TVsSAnZWagAAxNwP/2BzNszlde17SUMwjgIg\nuzpqwo0TsTNMQazrwzxfAc6OnNh7bowA7ZfU1Dxh14QKvCTy55ktUTur3oAt\nj7Sby5iAMVsDlxhMZZ1QtJFhsiFfMZosXh3LCEMxDookdEKPJDZTdYcj2mtD\n9TC4d/gqeKoOfriU9i6P7bvMa/8+eM4OGSfd+TxA/XDP8ZEoB72YWOm4xmEZ\n3Wyrx+fCrec2OJRw9VRmQaERRBBdoHfkbwh6g69lJ4J9fYaOCsBx/G/G5mb+\nT6c7clc3Usef2S8rmFvcIO48jxr58XYaZXuyEUXpo2bhqNXlcGOW4J26Tf7T\ntFJeAiv2BVVkS1vCB3ZjfKtbtEW5hqX+LVHYZQJb2hpphv/n7lqGfobtk2To\ny8FEn7V0ANk76eBdA/3KqO6a5qltF19i1z9fH8oJfzvOLiOx8f2vATiihxq8\ng/3qzf1Dj4xxrQhyM4wC4BX+b+Xi58xrmFMMeFa1nTMBknzfKjARq0lLRX4C\nFIpLGL0j7aM34n2mo/vn9A/G11aWV3SgDeu1+YcVjrP/ZQcR2ypo28q7QlUn\nZBKRdy3a4LRvzBek261FDck0DUjtQbPpwcQ6d4c55ei/zxxa1jzPZtz43HtI\nQKI8aVw0n1s9KbO9OC04JirIZzcg4auDNDRlraX8+frhNnrjt78nWAd6Qm0a\nocJw\r\n=Hqs/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLutI93ZpaQoV0avBzEjShTF9N3w3HUDXRjBFaFJ5rPQIhAKyXiee7tj7bPi+SKDCAtJJJmKoumrg/+kY0JzV3pTQ8"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.1-master.20190904123415_1567600688441_0.010760982981212086"},"_hasShrinkwrap":false},"1.2.1-master.20190905171149":{"name":"@atomist/sdm-local","version":"1.2.1-master.20190905171149","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.2-master.20190903184656","@atomist/sdm-core":"^1.6.2-master.20190903201907","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.1.4","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^2.6.3","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"bd02084029912c54d91f40606d62711ef019073a","_id":"@atomist/sdm-local@1.2.1-master.20190905171149","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-UdmbvOZZ+NBLjSqZpSr2grlqkWTtL9a8cy/Sklf/pisp/p58WtlHZ1icClNpmJs4Xa2o/X+zNLcY7JURllI0/A==","shasum":"9c00477e7f990fb5172a698b03b8db64ac259226","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.1-master.20190905171149.tgz","fileCount":358,"unpackedSize":1321609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcULWCRA9TVsSAnZWagAACbYP/0HqacqRslWaXPZxi2y2\nGO7ZVWZcdznMPMYeqp15rpQkgaDsLikD18wr5tWzG7uo6hjgh4tUGBYxg3I6\n65e/5SarjnkEq3EelFb3nqSNRBqTeGTLLVoUKo9DnsNKQnqrgNAmGju8lbYn\nvemAQb2RedzsJrncPWbtLDyjv4VpjVPuS/qnnO2vKJo+S+yQT9/kNWYO7MwH\nmbyPLZ+I4PhXdJFSSow5JVFQtYrQa4KSbv1eQwF+DvXxmltojJuJFPKbrgsL\nwpou3bYSHMZxMoC3eCzMGftiB1ZOmzJOH7T6c1mHM3CW+dsrX+lxNb4tq4jg\nvxgF4nTs4JAtxxNrNG5TyAc+WaoQAglwHg2AtKQHuzEbyw8lWw1aN9Kb3tq1\nqBavIP4m0CCRd5B3H+p3x2oe36W3XfHKoMglSQZLuvBw/CKFs1XRTgdODo9Y\naHu3V9jUz1KmbxRd6NG4IjLt36TeyI23QpeTXUSxwbrjYUFNTxwKZnKpIasy\nuF2Z0BKACR2xb008zyEwFlBeLjjM2wPhL/cE1LvbPbN6YeRr/DPwl2hHHq8e\nwME4zPP02kDjeLlungghM7wwxEnflg24fu9yB5rssVhQXsQYO3+C27OWPU7q\nqA/Cxu+1D7ZlkAY5WPAR+qNGO9JmMTBV+GJcG6XxljQkrswqafgHiKw0ubZp\ncWNc\r\n=ZdAd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCs0A2mFFqBnjwbjb7EIFqp+1vmOByEbBfT9X+NEUQR+wIhALzPu5HVDs+00u30vjKwwdnt3GcqAoFy1hFn3ZIpQQbH"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.1-master.20190905171149_1567703765232_0.41895356503208037"},"_hasShrinkwrap":false},"1.2.1-master.20190905210152":{"name":"@atomist/sdm-local","version":"1.2.1-master.20190905210152","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.6.2","@atomist/microgrammar":">=1.2.0","@atomist/sdm":"^1.6.1","@atomist/sdm-core":"^1.6.1","@atomist/slack-messages":">=1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.6.3-master.20190904061426","@atomist/microgrammar":"^1.2.0","@atomist/sdm":"^1.6.2-master.20190903184656","@atomist/sdm-core":"^1.6.2-master.20190903201907","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"e69974ac20d3c0a153faddb11b7fe8ab285cbbbe","_id":"@atomist/sdm-local@1.2.1-master.20190905210152","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-447ycXfOXQK9yGfOdvVCHhE6ORdHOCw/MmumYY5Xa7BuEC13p49cElLXMtWB+gvlWH7Wl64+kmhyQVXl1ciYRQ==","shasum":"78b2b92c063b68782d5a2efafc6355b2de634b97","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.1-master.20190905210152.tgz","fileCount":358,"unpackedSize":1321619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcXipCRA9TVsSAnZWagAAxyMP/1qXEGwr1GQVyeKp2WYg\nMfdVcGsELnhfvsKByiZ4YnobcGmIYwRV586FVOSG+WvZLfdyEuN5Lfc2bH7C\nqluK7WBilq6AG/GL9k7u3ZLXhu/0Kf7TnRFBsZORX9KTDeLKeZ5eRjXXNx2q\npwBuBkTV6xtjZ6O1IIfSZQrb+iIx25/0/kQCHpvBLtqka0j9bK53p10xvuX7\n0JPpyC0ggGMYSZgmbEGmjVnQMpuI4eIj5D0tbfvkG0KopGAlaCqkuyRQyP5v\nSjocGiu/wpSysbIg2bsVwF7lqxfOoWhPrA/m8QeOTXdWhWwumWCFHOY0Z47X\nr1XWgJoELrIH5PNqo0sXv+bEFd/hG5lDLm7mpc6Fc7eZ25tXe+gg57dd7jeH\nCjejlKLBQHvNO4KChRGoGFUf64IZB+hE7nE5nFi1Huq35j7Uv/vxFXfY3ME4\n/FXI5TYORt9pnN5VjJrUbosCaZCQrSWpeVZbFub0kZcptf3qsMh1HTX/nHOy\nZS4zIC29zd7zbfgE9DBGa7vo7PRE37kcRT5fQQTm5saaJLagVPE/DABKw5te\na54bD2f0w+mtBtUoE+zYNWflNXI76C7pz43TE80aAwBCb2r7NaLBkP1xYAYo\n9CBfMqCSOTyW1n3468vynuYtb+DsOhSHdICfXmN0QkdXr7kl/lFujJrm0+aE\n4VHr\r\n=SZJq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0lLLh3KTRQVYzoKKcZFDkj2Q03td8upFd5qfapLG6vgIhAKt5BSInL7oUmUOpvMYBQylL7ai6/SGnwpLn2VWi9rf/"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.1-master.20190905210152_1567717544328_0.048736129793749194"},"_hasShrinkwrap":false},"1.2.1-master.20190909182725":{"name":"@atomist/sdm-local","version":"1.2.1-master.20190909182725","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"396f8fe33ff4df4ed9b51aea6acc16ca41b9b985","_id":"@atomist/sdm-local@1.2.1-master.20190909182725","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-mxxcdto/G3af/0kQdTQ75CNPOXNcmzpY36OQfzG6S5IlCbaAo/b7iTVmHrsKbX+xyTamcGrjruIw6nD2U9/ovA==","shasum":"b4f2506356df959eb6b43b2da51cdd5b87e97bf2","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.1-master.20190909182725.tgz","fileCount":358,"unpackedSize":1324143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddprMCRA9TVsSAnZWagAAlC8QAIYT2KMV71jYWf7JKiGL\nWa/CjAXtD3rygHVJIxGo573qB8YHGWG4hWujPcNXT0uzNgkp7l4H43mbWQpC\ntswXO48dL7gF4zIB4D3r/+QXpI1oy22B5izFpjdLXKNPafANm+TD1BabqVRt\nPJFCb3QbrlRbo9d3uTavHQikYT9bVOqKiYb8Oop/r4NgcZyKojZ8ZHYv1xO7\nSHQrKHqd5JRSHx42/387dOVwpVsYusiR/eKGq++DOvcu4JkzAeQaFnEKe+qp\nScM8H6Y7Q3ns/mM748KnvQV6LYG2XY1DA6YRYdw4qGu+wcTtFJRLLu/fSf56\nm5Le9RafTzDP1Y0C4hSd1jXMg9qFJMuOwdf9QSnfXu7a870RFvALStOd1WbF\ntbQwBBKRq1yMYofoylaF46au/erqp2jbmWF9Yx4Uhir7gdN34batFvobs7dI\nJSCx/jCYRtQOSRsYy8DBWvbu18lOo3RM6/b5PVpIFSD3+h1xD2i+I6zQNXNE\n0nGON6kyNnA4nO4k4lglukviwpWBGLI9I0tYADHJUCKirRACHwFTPTRO6Vvp\ng85tAp4s0qbwV1xdpaiOdku3fVBzuEMWLUZQwUiCAS39TU6YRmUDARS6AxIe\nYyHR2809eaCJTn1lkxMJJqF3Ka6sJbMEXhkY3QogVyytu2ip2a6U6rAVvNtt\nKZ2t\r\n=R35e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBdyMPSxSXPa4v2+Vyt0+5lYH5yoJqsN/NuTVafqKeeyAiA0dugqvDQ7Wo5F3vQeXvjZlAuuhaqUU3H78aWBTlZtFw=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.1-master.20190909182725_1568053963361_0.3354299684521216"},"_hasShrinkwrap":false},"1.2.1-master.20190909183016":{"name":"@atomist/sdm-local","version":"1.2.1-master.20190909183016","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"396f8fe33ff4df4ed9b51aea6acc16ca41b9b985","_id":"@atomist/sdm-local@1.2.1-master.20190909183016","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-hBCyOusQXA33oLTvIYkfCKcRY6jM4Sa1TJHa7Rqs0hcVG3W/PnQv6cIXFi72CkI1KT2ccqpCb2BGj5sF+nFHHQ==","shasum":"2d0aae44477790ed078400ae5623c726cd39583f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.1-master.20190909183016.tgz","fileCount":358,"unpackedSize":1324143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddptFCRA9TVsSAnZWagAA1lYP/jIhJPMvV60jBxi2hGi3\n9AaFH0L6Mz2lhrygM2/BHK7EeyPHZfUkMCcmLNMjA3DpReop4mZoeCp0C6KR\n4SpWNk4ioQZC/jbOvEa4DBsk1VDdUsxRge3i0+lMzMv2DABVSi+E2Nx9zNPg\n8i7UaSOb3Hab4rHYNfacOEhYcglRGkri9hBmyhRPrQe1JEYJjf4ib5AcrndP\neuPbATLaq+hGCY1UeLJRs4Bu7ZGXoHzzWGDFgZoOsF18TXm7sLWIcKTZlCuB\nWL9wOStJzKTDMjDRx0Qt1S/It1Pn6G5R/lkXnrMDzKFcmHzNsfm/vjcQkbxb\nriJ1quO1anmDK0RdDMgcRdOdqHC7uS6nyNtwor/xkY/TO51heOoD+uLYz3YK\nLsn4T/LgrfekKIM1feQCW9KCk/QGn8OOwBQDCVX2AFH63JAapfGTsIxH3a1U\nIEtFRg8yojTrSgMpa58EWzAnr93a9EoCFkrWrX2liwvcrAvExyamGEe0SFn0\n06klJj0JNOoV58gcXFH+ZjPYi3ulrrpqwM9EEfMdrmYk5YnDQxsyCKBlq7sm\njaa2EmH30kqAmCfXVmpm2338qMFC8bm0mApzxU25GEDHw4+XF2IlSbkmK9Jl\n+gseiIS32WHUXU/vhilyKiY+JkQa0v6RSw1XmVOh5w3pSdswDLiu0T5EqPUJ\nzob3\r\n=iKkK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhkrD49VM+WxCJDDIJh/halrwgszNOQxq8CMwC5awiwAIhAOYv4RaRPUOMVHySApxCjwFulB5QIPt12QOoXEXfj43U"}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.1-master.20190909183016_1568054084557_0.6402969676244092"},"_hasShrinkwrap":false},"1.2.1":{"name":"@atomist/sdm-local","version":"1.2.1","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.2"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"gitHead":"c46724fffc02036473345fd78c5fd3f4c911947c","_id":"@atomist/sdm-local@1.2.1","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-n8RdRQPlDmviH1ThFvX2fNeSzCD/cTPybmj/gxP80IDulIl+UswgiK9m5ZqRhVshQrbnXNCmjWGX/VklNIe1yw==","shasum":"100aa886b825b1ad8de0cd9985c57a290f73be84","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.1.tgz","fileCount":358,"unpackedSize":1324121,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddqUHCRA9TVsSAnZWagAAi6YP/jSOjsQ9WCZyf/hsIs5T\np1IPiorZ5Ia+1uJR/1rc5hSzxG3E5gswMpYzb0b47jlOS6u4xy+7KFzXtAbB\nv9SYHSSRpmvzkI2mFkf6CsR4KuHQcW//zN542+h6x9WWQ5Scy/q5FvmLv5J/\ncapoGEuibsRlNTENC1G6mCeWuF7jAAbMgFOGBKkO+dTgfI6dml/pxEYbR0Q7\n5xPs6XLEW0ld95fcAlyElRjDdN4MUKCv3OIJbyEphT0QCarBoQhikzmlNO2K\nwe4oE2Yit6/NtoeVA7X0kenO85mqjPalZHGgALMR8NGEC5fiIu1Ff1LQgjhD\nXo/WgKZnuGKFqgd2rSfYHNRnsJArz6Jp+w6EEcrC6I+6Y9K7TfhdODt/AfmT\nthzwbHftwTbKSpMvVYu789JuwVHR/AJZ8Q9byAX3iGstdqzpzyF6th4yxgtl\nBrZrLyOsbI3J3hi+ii/Uty71FyM2mRmpSDc1h2fNw3yS1+z/nLgeGe/X682x\n9Q/RtH64+WvoWeVKw8T235JagzQfahBtepdcd/4MAIt5tYrEJv2LttTUTLCE\nWbcd8bhCEzt289sZ3hcUxKrOPpBxgCvVu845Nen2bfQPqlIeUe1KgyDIHK57\nG5+TcBPFTLWYY+TYePW2mA4/Wh1RVXriTcpOC3ACnIfrCb5QiPNHWH06m1HH\nh1Rt\r\n=rmNi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEr9I0hK2owSqENQ0i3I87SuVqfWAx38xaAVQJ+DxpaMAiEAnounqMRgoUL55dwnbAzgTp98NWGgkt/WO+1UWFzofB4="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.1_1568056583196_0.24103013570876608"},"_hasShrinkwrap":false},"1.2.2-atomist.a260p86nh.typescript-version.master.20190915202714":{"name":"@atomist/sdm-local","version":"1.2.2-atomist.a260p86nh.typescript-version.master.20190915202714","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"e35bc539f473f5934f1c02185a3cc6808192fe3f","_id":"@atomist/sdm-local@1.2.2-atomist.a260p86nh.typescript-version.master.20190915202714","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Y3Yyfp8R0cxsQpADWEY+L3Vtdnv8yMBWKpoA0n641vwnDPQipYvkT5vT9Vcl0SfB/aM0zFNhTH8Z48tgCW+fjA==","shasum":"865d75de6c957dc42d169d538ae421e8360d706a","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.2-atomist.a260p86nh.typescript-version.master.20190915202714.tgz","fileCount":358,"unpackedSize":1324265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfp9vCRA9TVsSAnZWagAAgNwP/Rlb4PrnIUgQWzxovvDz\nrQWw12DMNbQ/b87aoAptYeiEpjjbueyFpykH54orjUEPJPVH3nAP+sks2HDj\nFTYr4Cy9vkjJUnY1DikWF01qLK9BxWTnjiJ2o+aqWfyxzKB96uDsKKhCvbne\nY8IGAyErbCe6b39EGPkVd0ApuHgQqqjomNMtx45ci9uFjjIa6x1kgDTJUU19\n/sbmVUkLQXi2yLuEyqy+oaOmp9eeprQObB/4XR7sxV4wQ0HumDpOf98dm+Mp\nLuOvxLnyXpTzYxjixKbAWiBImOyy0ITsxtNEEis+FGwH8eYZLEV1sP7hd5Tu\nSBmCHKLIPMvMa2w4IHxegSNIPd+XM0RzDGNB5R0DNNA6OA/mwZrlPAb4xUmu\nzeSnnfSDSmSrD+lsh14w0RKZMj1RzPCi3q6OLAPMf+nBqtqoS81Ng847yyvH\nZeJid8bZ+wm6He1Yi7T7TnVcCWxr9WDfeAfsUJh9ueO9dCj+pkIxakl1e6hj\nfaeCbMAjqAJgHo2QKjt9Oes4CEgcL6dUM6oR3t5FDMnU9VWaPiEM9P6DDUFz\n3MDjJCmMDTjaDiA4jtWN+zGuZE3j9rQoZGSFeBU7zp1SnypkIH/4/NBXkyT5\nBVD0qSDLmwCTn87nFJdrXPWP56weEUwXaD1O8wFbMgi/JKo4lEW/MNP/k9tb\n4Nxa\r\n=aNwZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw1Q4ITXtiHry8XBVhWfRCavlJien8x22owRWn4sGhNgIgOzifxg2hliYEwMFnK/v8a5u3wmQNJEueAO2+R3uOkhU="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.2-atomist.a260p86nh.typescript-version.master.20190915202714_1568579439066_0.9555935241757156"},"_hasShrinkwrap":false},"1.2.2-master.20190915225612":{"name":"@atomist/sdm-local","version":"1.2.2-master.20190915225612","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"6ffdd4984e7fc730fa56ec93baba63e16fc72c45","_id":"@atomist/sdm-local@1.2.2-master.20190915225612","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-AhZ6VTRjdgOcGsmA0lYuaNbdyCNR/ZDupYydzm9qzr/grx/008/a0n7mO1pgnQiIoUZscLYmtXiD9Qo0sukKGQ==","shasum":"b03e5272959170922b329516528e3cfef4f42f9f","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.2-master.20190915225612.tgz","fileCount":358,"unpackedSize":1324228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfsJBCRA9TVsSAnZWagAAHZAP/jveke0v7fqf9oKKdtzP\nhyz/0guKjg1JbnwBgFNsUFbOV5wNVWj4cNU9wE3zSZuU4PPL2CZ5nOX/wCK8\n4vVRfC7CHEf22LCcLW/s1zSbMprIjzljiGQxW/mTIuBqEC04osTu5igOToCk\n25Qc91QExha/PFo1w8TMt4mnvsraXr7/w59Oa9kgRiQqH1yNC73PsturNoiW\nwAPn358RJkGxaUy9pwOInUXGh+l5mFhcu9z1TDZedBSrKRDiieEFn54/862h\nF2WTyh8vdviHsRrBUstarOsGeah1pYllLrsoW2vKbCFRGCHazLphvqjXSMvN\no0wqOx+Pog1IronJDO3peQcacrLVD253IXQyzHFNwcEx9x+FtEG9oxy9KUjv\n9oyeBZWvdOdWq5JaWdPq85Yc7bV9Z06R2c0vlyu+v1skOEXM+A9ry1fq2vkM\n4OJ1raucXEsFpDPjaIBXsAUaq9Gkoun9Z4E1yRHjDfdYylIkrLSC4aeyF8Lm\nyO+MSzGBrOxBrF0Yz5pvfHGzaEANFJxWOVR3QW0Nanu4bGn080XSN6BVU/1C\nmzvCyXvh9ygU/6nDODOg8mn7aroRFOUjc6MyUzP2Q0gFvZHmlyzbltmYOG18\nCzxWuAsuw57Tkp5y80wNiMu+gzPMSEVr4BAxJKp31fejsvd2xEmuVKhe7LGA\nVHMu\r\n=TG8t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWyRlUye/HpMWkXLgmRghsRICtA7G6zS6fRFpkTlW/fAiB+4xOJ9TXuaUywvDyanDosZNY0ZvD29aB8YZ/9fg+bKg=="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.2-master.20190915225612_1568588352597_0.4793081422573495"},"_hasShrinkwrap":false},"1.2.2-master.20191011215150":{"name":"@atomist/sdm-local","version":"1.2.2-master.20191011215150","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1"},"devDependencies":{"@atomist/automation-client":"^1.7.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^1.7.0","@atomist/sdm-core":"^1.7.0","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.2.0","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.3.0","tslint":"^5.19.0","typedoc":"^0.15.0","typescript":"^3.6.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"d856713d4aeda97066d6be963dbb675504cb2039","_id":"@atomist/sdm-local@1.2.2-master.20191011215150","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-KcVgh5BtXmaq64ua8f403ipiFhIpZo+WzW7OVqgGNIj5IwMk4wSHAxkGxK8cfBy7wZpatfapoStEV3T/iNjbjg==","shasum":"e4c195c29b85982774fefdb92f87d69dd41d7f52","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.2-master.20191011215150.tgz","fileCount":358,"unpackedSize":1328832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoPnmCRA9TVsSAnZWagAAvlwP/04wCuLm7dqKTbc0KKGd\nwC0cTXG+QyPFkdgpVLWOsbPIJ9Tf/EgLCWLbSuL++VBquc4xHkWErqOfyQB3\nhLNI1zbHG2Dn3GDWmQOq1BhEQTou82agsarGumXePBKGYTuhoLKVYa0v0CEO\nVHgm+XEfcDKRNmA+e7zePs36RgZtnaZTNknCQ09tmGAqBRk3fsBo9tlbMtzE\nE2rCNfqdXMYXbOg8ZFZO3NyD8IOvpJrMMKjL0g+uXyufrTJQPWOMF6rgo3S5\nmFzfu59CuJtTbOGBpW3p5NLggeRmfsAvNCSiHO0N19pMAacRqiJ+RoWwhJyG\n3xsKdQVsLsSQnHPsOK5hLqB9YfNsBAm1DghesfXLEr1N4zAdymkKC7+shYbb\n5ufHmYSBOTp5hAX5MXjjdkUDAQmWJriS0BcNA/UjEjREbdA3xq1N9WIUJhaR\ndq13ODOpyemh6AME2160rLYFhrb/b0DBpCMep+yGDjollLXziGomYdWvsS+2\nsvwrb45itHFv22Cz9ioyAff64KxOFyugEHmUIdnslse6DHglHsiyB7i5ZdUm\nJz4qd+QlZ57jbVsyiqKtOWy9Fg4TsYEEt5ZPvEvsE9Rv+E29AYYjkftXr2tf\nHQQKVh6kzWxEidYpdhl91+bWo+Zq+NJrb/fNJvnnISRJN9M2RwtfTLbRvd60\npeJy\r\n=ucSK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHaiQolbFg6hYCDiAr5JaZClydEKPdBl+pQ4SN05enDOAiEA9R5SfRWDXgohuCEEmhkj+jUF0P18JwZ/iRyfaL374Ds="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.2-master.20191011215150_1570830822215_0.10497389012727076"},"_hasShrinkwrap":false},"1.2.2-master.20191206162119":{"name":"@atomist/sdm-local","version":"1.2.2-master.20191206162119","description":"Atomist Software Delivery Machine - Local","author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"license":"Apache-2.0","homepage":"https://github.com/atomist/sdm-local#readme","repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"keywords":["atomist","automation","sdm","local","ci","cd"],"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"main":"./index.js","types":"./index.d.ts","dependencies":{"@types/body-parser":"^1.17.0","@types/express":"^4.17.0","@types/express-handlebars":"0.0.32","@types/fs-extra":"^8.0.0","@types/inquirer":"^6.0.3","@types/json-stringify-safe":"^5.0.0","@types/jssha":"^2.0.0","@types/lodash":"^4.14.136","@types/marked":"^0.6.5","@types/node":"^12.6.2","@types/node-notifier":"5.4.0","@types/sprintf-js":"^1.1.2","@types/yargs":"^13.0.0","ansi.js":"^0.0.5","axios":"^0.19.0","body-parser":"^1.19.0","boxen":"^4.1.0","chalk":"^2.4.2","express":"^4.17.1","express-handlebars":"^3.1.0","file-url":"^3.0.0","format-date":"^1.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.0","json-stringify-safe":"^5.0.1","jssha":"^2.3.1","lodash":"^4.17.14","lodash.template":"^4.5.0","lodash.merge":"^4.6.2","marked":"^0.7.0","marked-terminal":"^3.2.0","on-new-line":"^1.0.0","portfinder":"^1.0.20","serialize-error":"^4.1.0","simple-node-logger":"^18.12.23","sprintf-js":"^1.1.2","strip-ansi":"^5.2.0","terminal-kit":"1.28.3","yargs":"^13.2.4"},"peerDependencies":{"@atomist/automation-client":"^2.0.0","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"^2.0.0","@atomist/sdm-core":"^2.0.0","@atomist/slack-messages":"^1.1.1"},"devDependencies":{"@atomist/automation-client":"2.0.0-master.20191206152722","@atomist/microgrammar":"^1.2.1","@atomist/sdm":"2.0.0-master.20191206153457","@atomist/sdm-core":"2.0.0-master.20191206160429","@atomist/slack-messages":"^1.1.1","@types/mocha":"^5.2.7","@types/power-assert":"^1.5.0","axios-mock-adapter":"^1.17.0","espower-typescript":"^9.0.2","mocha":"^6.2.2","npm-run-all":"^4.1.5","power-assert":"^1.6.1","rimraf":"^3.0.0","supervisor":"^0.12.0","ts-node":"^8.5.4","tslint":"^5.20.1","typedoc":"^0.15.3","typescript":"^3.7.3"},"directories":{"test":"test"},"scripts":{"autotest":"supervisor --watch index.ts,lib,test --extensions ts --no-restart-on exit --quiet --exec npm -- test","build":"run-s compile test lint doc","clean":"run-p clean:compile clean:doc clean:run","clean:compile":"rimraf git-info.json \"index.{d.ts,js{,.map}}\" \"{lib,test}/**/*.{d.ts,js{,.map}}\" lib/typings/types.ts","clean:dist":"run-s clean clean:npm","clean:doc":"rimraf doc","clean:npm":"rimraf node_modules","clean:run":"rimraf *-v8.log profile.txt log","compile":"run-s compile:ts","compile:ts":"tsc --project .","doc":"typedoc --mode modules --excludeExternals --ignoreCompilerErrors --exclude \"**/*.d.ts\" --out doc index.ts lib","lint":"tslint --format verbose --project . --exclude \"node_modules/**\" --exclude \"**/*.d.ts\" \"**/*.ts\"","lint:fix":"npm run lint -- --fix","test":"mocha --require espower-typescript/guess --require source-map-support/register \"test/**/*est.ts\"","test:one":"mocha --require espower-typescript/guess \"test/**/${TEST:-*est.ts}\"","typedoc":"npm run doc"},"engines":{"node":">=8.1.0","npm":">=5.0.0"},"readme":"<p align=\"center\">\n  <img src=\"https://images.atomist.com/sdm/SDM-Logo-Dark.png\">\n</p>\n\n# Software Delivery Machine - Local - `@atomist/sdm-local`\n\n[![atomist sdm goals](http://badge.atomist.com/T29E48P34/atomist/sdm-local/c9f93c3b-3cfb-4824-a590-15e7a5743a2d)](https://app.atomist.com/workspace/T29E48P34)\n[![npm version](https://img.shields.io/npm/v/@atomist/sdm-local.svg)](https://www.npmjs.com/package/@atomist/sdm-local)\n\nA **Software Delivery Machine** (SDM) helps you write and deliver code that is up to your own standards, at scale.\nThis project runs a software delivery sdm.machine locally on your sdm.machine, responding to your commands and your commits.\n\nFor instance:\n\n- Every time you make a commit, perform a build in the background, and tell you if it fails.\n- every time you make a commit, fix trivial linting errors.\n- at your command, perform common code changes that you program (such as upgrade a library). It can do this across all the repositories you have checked out, and tell you if this causes any build failures.\n- at your command, create a new project by copying and modifying a working project you already have.\n\nFor more information on software delivery machines, see Rod Johnson's blog [Why you need a Software Delivery Machine](https://the-composition.com/why-you-need-a-software-delivery-machine-85e8399cdfc0). This [video](https://vimeo.com/260496136) shows an SDM in action. \nThe blogs and videos show an SDM that connects to Atomist's cloud service. This repository contains a *local* software delivery sdm.machine that works on your development sdm.machine and responds to your commits, performing whatever actions you decide\nshould happen in response to new code. \n \nThe SDM framework understands code and delivery flows. Further description is in the Atomist [sdm library project](https://github.com/atomist/sdm).\n\n> This project is purely\nopen source and can be used without the\nAtomist service. However, the code you write it can\nrun unchanged to benefit your entire team if you do\nconnect to the Atomist service, as the `SoftwareDeliveryMachine` API is identical between local and cloud SDMs.\n\n## Quick Start\n\n### Prerequisites\n\n- Node (version??)\n\n### Steps\n\nInstall the atomist CLI with the following command.\n\n```\nnpm i -g @atomist/cli\n```\n\nUse the following command to create a new SDM:\n\n```\natomist create sdm\n```\n\nThis will create a new SDM instance in a git repository on your local drive, by default under `<user home>/atomist/<org>`.\n\nIn order to see what's happening across all your automation clients, start a local listener to the Atomist lifecycle feed. This plays the same role as Atomist lifecycle in Slack, showing activity on your repositories. The console will display messages:\n\n```\natomist feed\n``` \n\n*Optional*: You likely want CD for your own SDMs. (Otherwise, you can start and stop them yourselves, for example in your IDE.) SDM CD requires special support as an SDM would need to shut itself down to deliver itself. Thus there is a command to run a dedicated SDM to deliver other SDMs. Start it as follows:\n\n```\natomist deliver\n```\n\n## Usage\n\n### Overview\n\nYou customize an SDM to work with the code \nyou care about: fix formatting errors (with commits), perform code reviews, run tests, publish artifacts, etc.\n\nIt also responds to your commands: to create new projects, edit code in existing projects, or other actions\nyou program into it.\n\nThe instructions here will take you through \n\n   * Initializing your local SDM\n   * Seeing it react to a push, then changing how it reacts to your push\n   * Creating a new project with a generator\n   * Changing to project creation to work from a project of your choice\n   * Invoking a *code transform* to change code in one or more projects, then writing your own code transfor\n   * Running a command, then making your own commands\n\nLater, when they've proven useful, you can elevate your push reactions, generators, editors, \nand commands into the cloud for your whole team to use with [Atomist](https://www.atomist.com).\n\nHere is an architecture diagram:\n\n![architecture diagram](docs/local-sdm.png)\n\n### Setup\n\nTo create your local SDM, execute:\n\n```\natomist create sdm\n```\n\nThe SDM works only on `git` repositories.\n\nTo find projects on your filesystem, the SDM looks in directories group by owner (on GitHub, the owner is an organization\nor user; on BitBucket, the owner is a user or a BitBucket Project), and it looks for each owner directory\n under one parent directory.\n\nThe directory structure looks like this:\n\n```\n$ATOMIST_ROOT\n├── owner1\n│   ├── repo1\n│   └── repo2\n└── owner2\n    ├── repo3\n    └── repo4\n\n```\n`ATOMIST_ROOT` defaults to `<user home>/atomist`. \n\n3) Send commit events from your repositories to your SDM. See \"Configure existing projects\" below. TODO: test this. how does it know\n \n### Startup\n\nInstall the cli: `npm install -g @atomist/cli`\n\nStart your SDM in local mode by setting an environment variable and then invoking the atomist CLI. `ATOMIST_MODE=local atomist start`. The SDM will run in the background, listening for commands and events. This terminal will display logs.\n\nTrigger commands with `atomist <command>` in another terminal. Try `atomist say hello`! Your SDM will send messages right back to where you ran the command.\n\nEvents are triggered by git postCommit hooks. Messages from events don't come back to wherever you made the commit. Instead: \n\n#### See messages from events \n\nIn order to see messages from events (not interspersed with logs), activate a message listener in another terminal:\n\n```\natomist feed\n\n```\nYou can narrow down messages with the `channel` option. For example, this will display only messages to the given two services:\n\n```\natomist feed --channel=AccountService --channel=BillingService\n```\nYou can use the `--verbose` flag to show more information about command invocation. This is particularly useful when developing your SDM.\n\n#### Configure Existing Projects\n\nIf you already have repositories cloned under your $SDM_PROJECTS_ROOT, configure them to activate the local SDM\non commit.\n\nAdd the Atomist git hook to the existing git projects within this directory structure by \nrunning the following command:\n\n```\natomist add git hooks\n```\n\nSuccess will result in output like the following:\n\n```==> @atomist add-git-hooks\n2018-06-06T11:23:58.003Z [m:85087] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:23:58.051Z [m:85087] [info ] Searching under child directory [spring-team] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.052Z [m:85087] [info ] Searching under child directory [undefined] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.053Z [m:85087] [info ] Searching under child directory [x] of /Users/rodjohnson/temp/local-sdm\n2018-06-06T11:23:58.074Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/danger-mouse\n2018-06-06T11:23:58.076Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/fiddlesticks\n2018-06-06T11:23:58.077Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/foo\n2018-06-06T11:23:58.078Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/losgatos1\n2018-06-06T11:23:58.079Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/spring-team/spring-rest-seed\n2018-06-06T11:23:58.080Z [m:85087] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/x/y\n```\n\n> Running `atomist add git hooks` is only necessary for pre-existing cloned directories and directories that are cloned using `git` rather than the local SDM.\n\n## Reacting to commits\n\nA software delivery sdm.machine reacts to code changes. For instance, when you commit to a Spring Boot application, it can \nstart the app up locally, while running tests.\nWhen you commit to a Node library, it can publish a snapshot to npm, while running tests, and while fixing any formatting\nerrors and performing automated code review and identifying sensitive changes.\n\nMake a commit in any repository within $SDM_PROJECTS_ROOT, and the SDM will run immediately. \n\nCommits to managed repos generate Atomist *push* events.\n\n# Adding to your SDM\n\n> The API is identical to the API of a cloud-connected Atomist SDM.\n\n## Adding projects\nFurther projects can be added under the expanded directory tree in three ways:\n\n### Normal git Clone\n\nCloning any git project from anywhere under `$ATOMIST_ROOT` and running `atomist add git hooks` to add git hooks to it.\n\n### Symbolic Link\nGo to the correct organization directory, creating it if necessary. Then create a symlink to the required directory elsewhere on your sdm.machine. For example:\n\n```\nln -s /Users/rodjohnson/sforzando-dev/idea-projects/flight1\n```\nThen run `atomist add git hooks` and the linked project will be treated as a normal project.\n\n### 'atomist clone' Command\n\nThe easiest way to add an existing project to your SDM projects is: run the `atomist clone` command to clone a \nGitHub.com repository in the right place in the expanded tree and automatically install the git hooks:\n\n```\natomist clone https://github.com/<owner>/<repo>\n\n```\nThe arguments are the same as those to `git clone`.\n\nThis is the recommended way, as it will run Atomist onboarding events for a new repo.\n\nOutput will look as follows:\n\n```\n018-06-06T11:27:27.068Z [m:85220] [info ] Adding extension pack 'WellKnownGoals' version 0.1.0 from Atomist\n2018-06-06T11:27:27.116Z [m:85220] [info ] Adding GitHub project johnsonr/initializr\nCloning into 'initializr'...\nwarning: redirecting to https://github.com/johnsonr/initializr/\n2018-06-06T11:27:33.349Z [m:85220] [info ] addGitHooks: Adding git post-commit script to project at /Users/rodjohnson/temp/local-sdm/johnsonr/initializr\n```\n\n## Running Commands\n\nAll commands (\"skills\") on connected SDMs will be shown by the following command:\n\n```\natomist show skills\n```\n\nThe CLI exposes the \"intents\" of all commands based on their command registrations. Type in intents as follows to activate the command:\n\n```\natomist create spring\n```\n\nNo parameters beyond the command name are required to invoke an intent. However, command-specific parameters may be provided in options syntax.\n\n> Clashing intents cause ambiguity, which will be flagged in a warning message. Try to avoid clashing intents between your commands, within or across SDMs.\n\n## Architecture\n\nThis project consists of four parts:\n\n- One or more Atomist SDMs running in their own processes, in a special local mode\n- A command line, exposed as a Node binary.\n- `git` hooks inserted in those projects you wish to use the local SDM with.\n- A feed listener process which, if running, will display all messages from the SDMs and some diagnostic information.\n\n## Troubleshooting\n\n- *My command isn't accepted by the CLI, nor shown in the usage message of `atomist --help`*: Check that the relevant SDM is running in local mode. The list of commands (beyond the built-in commands) is built dynamically on every invocation, so if the relevant SDM isn't running the SDM will not respond to those commands.\n\n\n## Advanced Setup\n\n### Mapped Parameters and Secrets\nEnvironment variables\n\n- `ATOMIST_ROOT`: Default system-wide location for Atomist expanded directory tree. Defaults to `<user home>/atomist`\n- `ATOMIST_GITHOOK_VERBOSE`: Make Atomist git hooks synchronous (although they will never block a git action, and display output to the console\n\n- `ATOMIST_TEAMS`: Shared with Atomist cloud service. Comma-separated list of teams we will use.\n\n- `SLACK_TEAM`\n- `SLACK_USER_NAME`\n\n### Required Ports\n\nThe following ports are required:\n\n- `2866`: The default port for your Automation client. By default ports 2866-2876 are regularly checked for running automation clients, so if you restrict your clients to these ports you do not need to configure anything.\n- `6660`: The default port for listening to all Atomist messages\n- [Port range above `10000`]: Atomist will find free ports for routing messages back to command line. These ports will be used only during command execution.\n\n> To start additional automation clients, increment the port by 1 for each after 2866.\n\n## Roadmap\n\n- Decide how to get build results from external tools in (if we wish to)\n\n","readmeFilename":"README.md","gitHead":"7e186500c3bca93ce216d34b86d64f6e919182fd","_id":"@atomist/sdm-local@1.2.2-master.20191206162119","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Ib78fh2fRPNyWgtlIvEsuwIDzQ9eNcJFQBhNSc3iHn30HK784eA2mehSW1Irdxnzs29OGkElg3Zzzlo0qDtFhQ==","shasum":"43ceb19d845a58d3e5700ef42d3aa7f4d1971b22","tarball":"https://registry.npmjs.org/@atomist/sdm-local/-/sdm-local-1.2.2-master.20191206162119.tgz","fileCount":358,"unpackedSize":1326615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6oBhCRA9TVsSAnZWagAADKoP/3tyMwr/sGyzvFXxkjaD\nDD7lDbwY9Erqqug56gjk6yX6GIxEOZV5+f9qZNG2zmGO+V5U0p9CFVLCnkqm\nHlL1vCoqHUDH6Dg/sReqWyqmkSZ6e4kucRUYPeM3wD4FibcfN9O9n/9iFRCX\n55kU3Sq5t5CZg3ZKtgjxW15AW/FMcZZd21CNnWiVDQ+IE8hX2NvO2bGFFQhW\ntUBqQkkD6n/QnN0x1CdNzv2zkiZhOmo+a75c2wDFakTo8BuQejN9ZvnPoiTg\nAzMtavTB74V5C9sfECbA+LMQDE3r0rknfLPP9h2QhTD7qAjP38SsDIbLpBot\nx9KCLu0rAPbHi3n4H3YE8/iiW6hWZF+wCNICt1NPjFqP2vnJGy5Oc6lvU7Wx\ni1AqcChEq4vFddUIAFMpq4h8kGBJUL9ioy9zqfkbVFlYZ7oQmCilLmjSyoGd\nxrB+yfXmnuYJFR5naY7+USKPXiKgo/gCSb2f2QTKGOPzV+E14MWfwdTShOkg\ndTDzKrD2QaZhUN15odJJx9c85oEzAiAfB8YW2nC3yjISeM0DxiBVzf8mNllc\npe9jhoFQ7yGy/WureQLer78krT6JwEjRjggV55RUd1WLEEOVSzBOp7raL/ER\nD9Sc3nQLosR9H9JhcMl6uHYAXKC/e68hUBy6Qe+wOj/8BbuOkpGdnc1U29nI\n62ig\r\n=B55/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD300jzT2eIyR+I4CsaV/MG+jda5apAz4kSz7yoUd2XgAIgdpWokreRc8YemwPZLdtzIeIYCd95mdWCqJDmGAEWdEM="}]},"maintainers":[{"name":"atomist","email":"npm@atomist.com"}],"_npmUser":{"name":"atomist","email":"npm@atomist.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdm-local_1.2.2-master.20191206162119_1575649377202_0.21349907159084647"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-01T06:16:52.945Z","0.1.0-20180801061415":"2018-08-01T06:16:54.328Z","modified":"2023-02-23T17:59:36.003Z","0.1.0-20180801065624":"2018-08-01T06:58:54.034Z","0.1.0-20180801070122":"2018-08-01T07:03:24.040Z","0.1.0-20180801071600":"2018-08-01T07:18:11.032Z","0.1.0-20180801074353":"2018-08-01T07:46:00.759Z","0.1.0-20180801075211":"2018-08-01T07:54:43.322Z","0.1.0-20180801101804":"2018-08-01T10:20:06.759Z","0.1.0-20180801110510":"2018-08-01T11:07:23.463Z","0.1.0-nortissej.shorter-action-urls.20180801201150":"2018-08-01T20:14:30.325Z","0.1.0-nortissej.shorter-action-urls.20180801212023":"2018-08-01T21:22:51.714Z","0.1.0-20180801212247":"2018-08-01T21:24:57.918Z","0.1.0-20180801221828":"2018-08-01T22:21:06.671Z","0.1.0-20180801222616":"2018-08-01T22:28:50.360Z","0.1.0-20180801231809":"2018-08-01T23:20:05.368Z","0.1.0-20180801234657":"2018-08-01T23:48:56.496Z","0.1.0-20180801235845":"2018-08-02T00:00:46.949Z","0.1.0-20180802014144":"2018-08-02T01:43:36.152Z","0.1.0-20180802021713":"2018-08-02T02:19:11.902Z","0.1.0-20180802024254":"2018-08-02T02:44:59.172Z","0.1.0-20180802064619":"2018-08-02T06:48:35.228Z","0.1.0-20180802080109":"2018-08-02T08:03:26.958Z","0.1.0-20180802093856":"2018-08-02T09:41:17.420Z","0.1.0-20180802110407":"2018-08-02T11:07:01.424Z","0.1.0-20180802154823":"2018-08-02T15:50:45.231Z","0.1.0-nortissej.mp.20180803011011":"2018-08-03T01:12:30.260Z","0.1.0-20180803011136":"2018-08-03T01:14:23.862Z","0.1.0-20180803011225":"2018-08-03T01:15:15.346Z","0.1.0-20180803012706":"2018-08-03T01:29:52.269Z","0.1.0-20180803015459":"2018-08-03T01:57:26.038Z","0.1.0-20180803030219":"2018-08-03T03:05:03.776Z","0.1.0-20180803031620":"2018-08-03T03:19:09.634Z","0.1.0-20180803033708":"2018-08-03T03:39:54.125Z","0.1.0-20180803040608":"2018-08-03T04:08:58.236Z","0.1.0-20180803061636":"2018-08-03T06:19:27.581Z","0.1.0-20180803063425":"2018-08-03T06:37:20.430Z","0.1.0-20180803064107":"2018-08-03T06:43:02.196Z","0.1.0-20180803081940":"2018-08-03T08:21:40.916Z","0.1.0-20180803221344":"2018-08-03T22:15:50.433Z","0.1.0-nortissej.more-error-handling.20180803224712":"2018-08-03T22:49:15.871Z","0.1.0-20180803225050":"2018-08-03T22:53:03.722Z","0.1.0-nortissej.more-error-handling.20180803230402":"2018-08-03T23:06:25.862Z","0.1.0-20180804030110":"2018-08-04T03:03:54.132Z","0.1.0-20180804032512":"2018-08-04T03:27:55.084Z","0.1.0-20180804090243":"2018-08-04T09:05:16.945Z","0.1.0-nortissej.more-error-handling.20180804090701":"2018-08-04T09:09:44.699Z","0.1.0-20180804090823":"2018-08-04T09:11:14.187Z","0.1.0-20180804091011":"2018-08-04T09:12:58.216Z","0.1.0-20180804102355":"2018-08-04T10:26:40.426Z","0.1.0-20180804103059":"2018-08-04T10:33:42.559Z","0.1.0-20180804225206":"2018-08-04T22:54:56.279Z","0.1.0-20180804231300":"2018-08-04T23:15:51.188Z","0.1.0-20180805013533":"2018-08-05T01:38:22.175Z","0.1.0-20180805084253":"2018-08-05T08:44:51.427Z","0.1.0-20180805095055":"2018-08-05T09:52:53.593Z","0.1.0-20180805104606":"2018-08-05T10:48:05.257Z","0.1.0-20180806011106":"2018-08-06T01:13:26.424Z","0.1.0-20180806013045":"2018-08-06T01:33:23.482Z","0.1.0-20180806020457":"2018-08-06T02:07:00.420Z","0.1.0-20180806022138":"2018-08-06T02:23:34.560Z","0.1.0-20180806025004":"2018-08-06T02:52:04.297Z","0.1.0-20180806042046":"2018-08-06T04:22:51.949Z","0.1.1-20180806042626":"2018-08-06T04:28:30.190Z","0.1.2-20180806043006":"2018-08-06T04:32:06.707Z","0.1.3-20180806043336":"2018-08-06T04:35:40.383Z","0.1.3-20180806045421":"2018-08-06T04:56:25.743Z","0.1.3-20180806054636":"2018-08-06T05:48:39.125Z","0.1.3-20180806063532":"2018-08-06T06:37:57.559Z","0.1.3-20180806075233":"2018-08-06T07:54:57.662Z","0.1.3-20180806075910":"2018-08-06T08:01:49.745Z","0.1.3-20180806122015":"2018-08-06T12:22:42.245Z","0.1.3-20180806222435":"2018-08-06T22:27:18.575Z","0.1.3-20180806225005":"2018-08-06T22:53:08.368Z","0.1.3-20180806225312":"2018-08-06T22:55:26.535Z","0.1.3-20180806225219":"2018-08-06T23:04:32.980Z","0.1.3-20180807010421":"2018-08-07T01:06:26.663Z","0.1.3-20180807013120":"2018-08-07T01:33:34.933Z","0.1.3-20180807014030":"2018-08-07T01:42:29.129Z","0.1.3-20180807021711":"2018-08-07T02:19:20.844Z","0.1.3-20180807023031":"2018-08-07T02:33:09.402Z","0.1.3-20180807031509":"2018-08-07T03:17:17.046Z","0.1.3-20180807034606":"2018-08-07T03:48:43.471Z","0.1.3-20180807054135":"2018-08-07T05:43:59.741Z","0.1.3-20180807072357":"2018-08-07T07:26:38.994Z","0.1.3-20180807075658":"2018-08-07T07:59:33.845Z","0.1.3-20180807092255":"2018-08-07T09:25:43.176Z","0.1.3-20180807094736":"2018-08-07T09:50:29.983Z","0.1.3-20180807122651":"2018-08-07T12:29:48.229Z","0.1.3":"2018-08-07T12:31:51.712Z","0.1.4-20180807123258":"2018-08-07T12:36:15.011Z","0.1.3-fixForPathname.20180807213254":"2018-08-07T21:35:50.476Z","0.1.4-20180807221948":"2018-08-07T22:22:29.738Z","0.1.4-20180807231052":"2018-08-07T23:13:46.445Z","0.1.4-20180807231751":"2018-08-07T23:20:33.208Z","0.1.4-20180807232356":"2018-08-07T23:26:43.274Z","0.1.4-20180808005050":"2018-08-08T00:53:47.334Z","0.1.4-20180808005808":"2018-08-08T01:00:57.154Z","0.1.4-nortissej.doc-error.20180808011449":"2018-08-08T01:17:45.194Z","0.1.4-20180808013045":"2018-08-08T01:33:28.867Z","0.1.4-20180808021137":"2018-08-08T02:14:30.652Z","0.1.4-toplevel.20180808023212":"2018-08-08T02:35:21.082Z","0.1.4-toplevel.20180808023417":"2018-08-08T02:36:33.976Z","0.1.4-toplevel.20180808021535":"2018-08-08T02:48:08.333Z","0.1.4-toplevel.20180808031110":"2018-08-08T03:13:16.466Z","0.1.4-20180808034521":"2018-08-08T03:47:24.374Z","0.1.4-20180808051145":"2018-08-08T05:13:58.365Z","0.1.4-20180808060325":"2018-08-08T06:05:34.882Z","0.1.4-20180808072312":"2018-08-08T07:25:16.942Z","0.1.4-20180808082615":"2018-08-08T08:28:31.450Z","0.1.4-20180808083322":"2018-08-08T08:35:27.164Z","0.1.4-20180808111915":"2018-08-08T11:21:18.170Z","0.1.4":"2018-08-08T11:24:09.961Z","0.1.5-20180808114734":"2018-08-08T11:50:07.525Z","0.1.5-20180809001215":"2018-08-09T00:14:06.064Z","0.1.5-20180809012033":"2018-08-09T01:22:51.576Z","0.1.5-20180809012331":"2018-08-09T01:25:48.080Z","0.1.5-20180809015135":"2018-08-09T01:53:52.420Z","0.1.5-20180809023752":"2018-08-09T02:39:33.901Z","0.1.5-20180809125849":"2018-08-09T13:01:14.399Z","0.1.5-20180809144833":"2018-08-09T14:50:56.650Z","0.1.5":"2018-08-09T14:53:34.731Z","0.1.6-20180809145444":"2018-08-09T14:57:11.036Z","0.1.6-20180809153252":"2018-08-09T15:34:42.060Z","0.1.6-20180809163830":"2018-08-09T16:40:26.039Z","0.1.6-20180809175022":"2018-08-09T17:52:14.804Z","0.1.6-20180809180941":"2018-08-09T18:11:59.329Z","0.1.6":"2018-08-09T18:13:31.198Z","0.1.7-20180809181437":"2018-08-09T18:16:59.734Z","0.1.7-20180809193105":"2018-08-09T19:33:31.101Z","0.1.7-20180809204609":"2018-08-09T20:48:34.120Z","0.1.7-20180809205546":"2018-08-09T20:57:43.311Z","0.1.7-20180809210008":"2018-08-09T21:02:29.876Z","0.1.7-20180809211614":"2018-08-09T21:19:09.498Z","0.1.7-nortissej.add-libs.20180809224214":"2018-08-09T22:43:53.810Z","0.1.7-20180809230355":"2018-08-09T23:06:07.123Z","0.1.7-20180809230905":"2018-08-09T23:11:12.672Z","0.1.7-20180809231248":"2018-08-09T23:14:54.716Z","0.1.7-nortissej.typo.20180809232219":"2018-08-09T23:24:07.043Z","0.1.7-20180809232346":"2018-08-09T23:26:30.819Z","0.1.7-20180810092206":"2018-08-10T09:24:13.031Z","0.1.3-fixForPathname.20180810093012":"2018-08-10T09:33:14.138Z","0.1.7-20180810093024":"2018-08-10T09:33:40.180Z","0.1.7-workspaceId.20180810101306":"2018-08-10T10:15:15.886Z","0.1.7-workspaceId.20180810104913":"2018-08-10T10:51:20.632Z","0.1.7-lieven.fix-regex-path-windows.20180810125832":"2018-08-10T13:00:43.299Z","0.1.7-workspaceId.20180810132413":"2018-08-10T13:36:34.375Z","0.1.7-20180810133700":"2018-08-10T13:39:07.281Z","0.1.7-clean-package.20180810161625":"2018-08-10T16:18:51.112Z","0.1.7-20180810165309":"2018-08-10T16:55:20.256Z","0.1.7-20180810165931":"2018-08-10T17:01:45.769Z","0.1.7-20180810170906":"2018-08-10T17:11:17.857Z","0.1.7-yargsaver.20180810201651":"2018-08-10T20:18:35.142Z","0.1.7-yargsaver.20180810213117":"2018-08-10T21:33:14.390Z","0.1.7-20180810215423":"2018-08-10T21:56:36.612Z","0.1.7-20180810220215":"2018-08-10T22:04:28.769Z","0.1.7-yargsaver.20180810221147":"2018-08-10T22:13:33.472Z","0.1.7-20180810224846":"2018-08-10T22:51:22.211Z","0.1.7-20180811011838":"2018-08-11T01:20:30.291Z","0.1.7-20180811031646":"2018-08-11T03:18:58.251Z","0.1.7-nortissej.fixes.20180811040834":"2018-08-11T04:10:52.351Z","0.1.7-20180811041259":"2018-08-11T04:15:16.927Z","0.1.7-20180811171611":"2018-08-11T17:18:27.886Z","0.1.7-20180811173739":"2018-08-11T17:39:25.631Z","0.1.7-20180811180736":"2018-08-11T18:09:55.995Z","0.1.7-nortissej.move-conflict-warnings-to-help-messages.20180812184102":"2018-08-12T18:42:51.108Z","0.1.7-20180812192608":"2018-08-12T19:28:21.853Z","0.1.7-20180813030811":"2018-08-13T03:10:01.062Z","0.1.7-lieven.seeds.20180813075556":"2018-08-13T07:58:19.221Z","0.1.7-lieven.fix-regex-path-windows.20180813131520":"2018-08-13T13:17:32.758Z","0.1.7-20180813175424":"2018-08-13T17:56:52.778Z","0.1.7-20180813215621":"2018-08-13T21:58:45.715Z","0.1.7-20180814003715":"2018-08-14T00:39:08.845Z","0.1.7-20180814195425":"2018-08-14T19:56:15.008Z","0.1.7-handleDuplicateCommands.20180815130328":"2018-08-15T13:05:51.863Z","0.1.7-20180815130924":"2018-08-15T13:11:50.163Z","0.1.7-20180815132151":"2018-08-15T13:24:26.560Z","0.1.7-show-skills-2.20180816042117":"2018-08-16T04:23:52.256Z","0.1.7-show-skills-2.20180816042608":"2018-08-16T04:28:34.559Z","0.1.7-20180816042809":"2018-08-16T04:30:48.885Z","0.1.7-20180816205030":"2018-08-16T20:52:47.069Z","0.1.7-20180816210300":"2018-08-16T21:05:16.671Z","0.1.7-lieven.fix-regex-path-windows.20180817080745":"2018-08-17T08:10:04.235Z","0.1.7-20180817105426":"2018-08-17T10:56:53.990Z","0.1.7-20180817135252":"2018-08-17T13:55:25.004Z","0.1.7-20180817214641":"2018-08-17T21:49:05.304Z","0.1.7-20180817214716":"2018-08-17T21:50:01.563Z","0.1.7-20180817221330":"2018-08-17T22:15:56.499Z","0.1.7-20180818055647":"2018-08-18T05:58:59.494Z","0.1.7-20180818211349":"2018-08-18T21:15:24.547Z","0.1.7-command-form.20180818223105":"2018-08-18T22:32:40.414Z","0.1.7-20180819003010":"2018-08-19T00:32:14.718Z","0.1.7":"2018-08-19T02:35:13.518Z","0.1.8-20180819023613":"2018-08-19T02:38:11.885Z","0.1.8-20180819165830":"2018-08-19T17:00:35.418Z","0.1.8-20180819175628":"2018-08-19T17:58:34.831Z","0.1.8-20180819192225":"2018-08-19T19:24:29.559Z","0.1.8-20180820042253":"2018-08-20T04:24:52.936Z","0.1.8":"2018-08-20T04:25:30.418Z","0.1.9-20180820042625":"2018-08-20T04:28:31.510Z","0.1.9-issue-65.20180820100355":"2018-08-20T10:05:58.995Z","0.1.9-update-githook.20180820132555":"2018-08-20T13:27:50.176Z","0.1.9-update-githook.20180820203425":"2018-08-20T20:36:37.917Z","0.1.9-20180820204936":"2018-08-20T20:51:53.004Z","0.1.9-update-githook.20180820205052":"2018-08-20T20:53:17.234Z","0.1.9-update-package-json.20180820211948":"2018-08-20T21:21:52.195Z","0.1.9-nortissej.various.20180821001332":"2018-08-21T00:15:09.691Z","0.1.9-20180821004213":"2018-08-21T00:44:37.793Z","0.1.9-20180821004240":"2018-08-21T00:45:12.444Z","0.1.9-nortissej.various.20180821021132":"2018-08-21T02:13:13.282Z","0.1.9-20180821131200":"2018-08-21T13:14:08.270Z","0.1.9-20180821160132":"2018-08-21T16:04:01.756Z","0.1.9":"2018-08-21T16:09:14.024Z","0.1.10-20180821161016":"2018-08-21T16:12:33.186Z","0.1.10-20180821170454":"2018-08-21T17:06:49.466Z","0.1.10-20180821182135":"2018-08-21T18:23:33.850Z","0.1.10-20180821185332":"2018-08-21T18:55:24.416Z","0.1.10-nortissej.limit-markdown.20180821191345":"2018-08-21T19:15:38.118Z","0.1.10-20180821193415":"2018-08-21T19:36:08.977Z","0.1.10-20180821200948":"2018-08-21T20:11:54.569Z","0.1.10-20180821203658":"2018-08-21T20:39:09.555Z","0.1.10":"2018-08-21T20:41:13.712Z","0.1.11-20180821204214":"2018-08-21T20:44:32.029Z","0.1.10-spring-delivery.20180821223755":"2018-08-21T22:39:51.332Z","0.1.11-20180821224120":"2018-08-21T22:43:11.670Z","0.1.11-20180821224320":"2018-08-21T22:45:11.847Z","0.1.11-20180822025735":"2018-08-22T02:59:34.930Z","0.1.11-nortissej.local-action-form.20180822040317":"2018-08-22T04:05:16.688Z","0.1.11-20180822042916":"2018-08-22T04:31:15.011Z","0.1.11-20180822044618":"2018-08-22T04:48:14.402Z","0.1.11-20180822045405":"2018-08-22T04:56:06.054Z","0.1.11":"2018-08-22T15:24:20.513Z","0.1.12-20180822152520":"2018-08-22T15:27:16.799Z","0.1.11-nortissej.axios-next.20180822153840":"2018-08-22T15:40:39.580Z","0.1.12-20180822154146":"2018-08-22T15:43:49.249Z","0.1.12-130.20180823042537":"2018-08-23T04:27:29.532Z","0.1.12-20180823042659":"2018-08-23T04:28:52.892Z","0.1.12-20180823044730":"2018-08-23T04:49:38.900Z","0.1.12-20180823104406":"2018-08-23T10:46:13.991Z","0.1.12":"2018-08-23T10:51:46.757Z","0.1.13-20180823105246":"2018-08-23T10:55:05.701Z","0.1.13-20180823110537":"2018-08-23T11:07:46.838Z","0.1.13-rename-seed-projects.20180823122707":"2018-08-23T12:30:33.755Z","0.1.13-20180823124105":"2018-08-23T12:43:18.638Z","0.1.13":"2018-08-23T12:45:42.252Z","0.1.14-20180823124637":"2018-08-23T12:48:37.537Z","0.1.14-atomist-update-latest-1535090851236.20180824060737":"2018-08-24T06:09:29.176Z","0.1.14-20180824061559":"2018-08-24T06:18:07.593Z","0.1.14":"2018-08-24T06:31:59.613Z","0.1.15-20180824063252":"2018-08-24T06:35:06.278Z","0.1.15-20180824090321":"2018-08-24T09:05:27.487Z","0.1.15-20180824091441":"2018-08-24T09:17:05.802Z","0.1.15-20180824113229":"2018-08-24T11:34:32.631Z","0.1.15-20180824141518":"2018-08-24T14:17:46.247Z","0.1.15-marked-rendering.20180824141559":"2018-08-24T14:18:08.780Z","0.1.15-marked-rendering.20180824143505":"2018-08-24T14:36:45.129Z","0.1.15-marked-rendering.20180824143816":"2018-08-24T14:40:14.886Z","0.1.15-marked-rendering.20180824151214":"2018-08-24T15:14:15.956Z","0.1.15-marked-rendering.20180824152539":"2018-08-24T15:27:43.816Z","0.1.15-20180824153819":"2018-08-24T15:40:44.399Z","0.1.15-20180824153903":"2018-08-24T15:41:29.857Z","0.1.15":"2018-08-24T16:00:32.486Z","0.1.16-20180824160130":"2018-08-24T16:03:53.566Z","0.1.15-conflicting-commands.20180824161741":"2018-08-24T16:19:46.126Z","0.1.16-20180824221232":"2018-08-24T22:15:14.299Z","0.1.16":"2018-08-24T22:17:02.742Z","0.1.17-20180824221805":"2018-08-24T22:20:46.836Z","0.1.17-20180824223638":"2018-08-24T22:38:51.546Z","0.1.17":"2018-08-24T22:39:36.291Z","0.1.18-20180824224045":"2018-08-24T22:43:00.956Z","0.1.18":"2018-08-24T22:49:54.895Z","0.1.19-20180824225059":"2018-08-24T22:53:27.327Z","0.1.19-20180825082520":"2018-08-25T08:27:40.197Z","0.1.19":"2018-08-25T08:28:31.408Z","0.1.20-20180825082926":"2018-08-25T08:31:48.032Z","0.1.20-20180825085631":"2018-08-25T08:58:54.025Z","0.1.20-20180825090214":"2018-08-25T09:04:27.863Z","0.1.20":"2018-08-25T09:05:20.955Z","0.1.21-20180825090613":"2018-08-25T09:08:22.699Z","0.1.21-nortissej.outside-of-root.20180825204539":"2018-08-25T20:47:52.975Z","0.1.21-20180825205410":"2018-08-25T20:56:25.369Z","0.1.21-20180826124536":"2018-08-26T12:47:53.384Z","0.1.21-nortissej.return-result-once.20180827010715":"2018-08-27T01:08:47.752Z","0.1.21-20180827014030":"2018-08-27T01:42:20.053Z","0.1.21-conflicting-commands.20180827014432":"2018-08-27T01:46:27.849Z","0.1.21-20180827014810":"2018-08-27T01:50:20.715Z","0.1.21-20180827030524":"2018-08-27T03:07:37.278Z","0.1.21-atomist-update-latest-1535344389699.20180827043316":"2018-08-27T04:35:10.514Z","0.1.21-20180827043614":"2018-08-27T04:38:05.228Z","0.1.21":"2018-08-27T05:13:22.710Z","0.1.22-20180827051418":"2018-08-27T05:16:31.835Z","0.1.22-20180827091532":"2018-08-27T09:17:36.225Z","0.1.22-20180827092919":"2018-08-27T09:31:34.463Z","1.0.0-master.20180827115930":"2018-08-27T12:02:09.852Z","1.0.0-atomist-update-next-1535371237623.20180827120043":"2018-08-27T12:02:43.221Z","1.0.0-master.20180827120350":"2018-08-27T12:05:49.003Z","1.0.0-M.1":"2018-08-27T12:14:25.989Z","1.0.0-master.20180827160515":"2018-08-27T16:07:14.820Z","1.0.0-atomist-update-1.0.0-M.2-1535388611829.20180827165018":"2018-08-27T16:52:19.927Z","1.0.0-master.20180827165324":"2018-08-27T16:55:31.574Z","1.0.0-M.2":"2018-08-27T16:56:21.360Z","1.0.0-nortissej.git-clone.20180827205452":"2018-08-27T20:56:32.447Z","1.0.0-master.20180827212410":"2018-08-27T21:26:20.803Z","1.0.0-goal-rendering.20180827212706":"2018-08-27T21:29:12.453Z","1.0.0-goal-rendering.20180827222921":"2018-08-27T22:31:21.180Z","1.0.0-local-inv.20180828082642":"2018-08-28T08:28:33.161Z","1.0.0-master.20180828085033":"2018-08-28T08:52:46.810Z","1.0.0-master.20180828090736":"2018-08-28T09:09:40.003Z","1.0.0-master.20180828092554":"2018-08-28T09:28:01.536Z","1.0.0-master.20180828093057":"2018-08-28T09:33:08.110Z","1.0.0-goal-rendering.20180828093838":"2018-08-28T09:40:38.366Z","1.0.0-master.20180828170410":"2018-08-28T17:06:31.282Z","1.0.0-master.20180828170931":"2018-08-28T17:11:54.636Z","1.0.0-master.20180828233103":"2018-08-28T23:33:36.299Z","1.0.0-local-configuration.20180828233214":"2018-08-28T23:34:36.882Z","1.0.0-goal-rendering.20180828233218":"2018-08-28T23:34:52.821Z","1.0.0-master.20180829050738":"2018-08-29T05:10:05.529Z","1.0.0-master.20180829054459":"2018-08-29T05:47:24.695Z","1.0.0-master.20180829072925":"2018-08-29T07:31:50.580Z","1.0.0-local-configuration.20180829074632":"2018-08-29T07:48:34.646Z","1.0.0-local-configuration.20180829075831":"2018-08-29T08:00:39.050Z","1.0.0-local-configuration.20180829083446":"2018-08-29T08:36:30.872Z","1.0.0-local-configuration.20180829084100":"2018-08-29T08:42:46.776Z","1.0.0-local-configuration.20180829085424":"2018-08-29T08:56:29.880Z","1.0.0-master.20180829090801":"2018-08-29T09:12:27.770Z","1.0.0-local-configuration.20180829091123":"2018-08-29T09:14:10.495Z","1.0.0-local-configuration.20180829091637":"2018-08-29T09:19:02.432Z","1.0.0-local-configuration.20180829094143":"2018-08-29T09:43:49.380Z","1.0.0-local-configuration.20180829094254":"2018-08-29T09:45:07.068Z","1.0.0-local-configuration.20180829094838":"2018-08-29T09:50:57.438Z","1.0.0-local-configuration.20180829100227":"2018-08-29T10:04:35.082Z","1.0.0-master.20180829104519":"2018-08-29T10:47:35.328Z","1.0.0-goal-rendering.20180829144611":"2018-08-29T14:47:56.409Z","1.0.0-goal-rendering.20180829145348":"2018-08-29T15:05:10.325Z","1.0.0-goal-rendering.20180829150610":"2018-08-29T15:08:02.631Z","1.0.0-goal-rendering.20180829150809":"2018-08-29T15:09:41.667Z","1.0.0-master.20180829151738":"2018-08-29T15:20:07.850Z","1.0.0-master.20180829151935":"2018-08-29T15:23:00.849Z","1.0.0-master.20180829153832":"2018-08-29T15:40:50.995Z","1.0.0-goal-rendering.20180829154521":"2018-08-29T15:47:45.345Z","1.0.0-master.20180829161713":"2018-08-29T16:19:20.023Z","1.0.0-master.20180829163758":"2018-08-29T16:40:31.424Z","1.0.0-master.20180829204627":"2018-08-29T20:57:53.902Z","1.0.0-master.20180830082451":"2018-08-30T08:27:12.789Z","1.0.0-master.20180830083232":"2018-08-30T08:34:39.616Z","1.0.0-master.20180830112313":"2018-08-30T11:25:52.026Z","1.0.0-src-to-lib.20180830143204":"2018-08-30T14:34:08.830Z","1.0.0-master.20180830153511":"2018-08-30T15:37:38.512Z","1.0.0-nortissej.reset-goals-command.20180830214056":"2018-08-30T21:42:36.565Z","1.0.0-merge-pull-requests.20180831160946":"2018-08-31T16:11:41.220Z","1.0.0-master.20180831180143":"2018-08-31T18:03:45.946Z","1.0.0-src-to-lib.20180831184924":"2018-08-31T18:51:18.767Z","1.0.0-master.20180831185416":"2018-08-31T18:56:32.267Z","1.0.0-nortissej.firstPush.20180831233922":"2018-08-31T23:41:25.150Z","1.0.0-master.20180902134145":"2018-09-02T13:43:57.527Z","1.0.0-master.20180902163040":"2018-09-02T16:33:01.623Z","1.0.0-master.20180902182152":"2018-09-02T18:23:53.251Z","1.0.0-master.20180903010235":"2018-09-03T01:04:30.847Z","1.0.0-nortissej.skip-nonlocal-machine.20180903023351":"2018-09-03T02:35:36.004Z","1.0.0-master.20180903043456":"2018-09-03T04:37:18.516Z","1.0.0-master.20180903192503":"2018-09-03T19:28:32.961Z","1.0.0-master.20180904074511":"2018-09-04T07:56:39.174Z","1.0.0-master.20180904104648":"2018-09-04T10:48:57.270Z","1.0.0-nortissej.reset-goals-command.20180904173242":"2018-09-04T17:36:11.704Z","1.0.0-atomist-update-1.0.0-M.3-1536084352170.20180904180600":"2018-09-04T18:08:32.034Z","1.0.0-master.20180904180944":"2018-09-04T18:11:52.566Z","1.0.0-M.3":"2018-09-04T18:15:38.913Z","1.0.0-master.20180905234344":"2018-09-05T23:46:44.286Z","1.0.0-master.20180906162821":"2018-09-06T16:31:12.645Z","1.0.0-master.20180906164627":"2018-09-06T16:49:13.429Z","1.0.0-nortissej.less-complaining.20180906180444":"2018-09-06T18:07:19.149Z","1.0.0-master.20180906180904":"2018-09-06T18:11:55.422Z","1.0.0-nortissej.less-logging.20180906181855":"2018-09-06T18:21:03.919Z","1.0.0-master.20180906182755":"2018-09-06T18:30:32.992Z","1.0.0-master.20180906211350":"2018-09-06T21:16:15.060Z","1.0.0-nortissej.dont-barf-on-no-goals.20180906224521":"2018-09-06T22:47:31.073Z","1.0.0-nortissej.dont-barf-on-no-goals.20180906225943":"2018-09-06T23:01:52.144Z","1.0.0-nortissej.dont-barf-on-no-goals.20180906230508":"2018-09-06T23:06:54.625Z","1.0.0-master.20180906233041":"2018-09-06T23:33:14.136Z","1.0.0-nortissej.default-transform-result.20180906235242":"2018-09-06T23:54:46.944Z","1.0.0-master.20180907085349":"2018-09-07T08:55:52.479Z","1.0.0-nortissej.dont-add-commands-from-nonlocal-clients.20180908002328":"2018-09-08T00:25:37.511Z","1.0.0-nortissej.default-to-head.20180908015245":"2018-09-08T01:54:53.166Z","1.0.0-master.20180908065035":"2018-09-08T06:53:01.016Z","1.0.0-master.20180908151320":"2018-09-08T15:15:41.949Z","1.0.0-master.20180910161935":"2018-09-10T16:21:55.744Z","1.0.0-master.20180910174550":"2018-09-10T17:48:14.716Z","1.0.0-master.20180910202515":"2018-09-10T20:27:50.070Z","1.0.0-nortissej.deep-clone.20180912040514":"2018-09-12T04:07:15.877Z","1.0.0-master.20180912043733":"2018-09-12T04:39:54.250Z","1.0.0-logging.20180912102628":"2018-09-12T10:28:33.182Z","1.0.0-master.20180912130018":"2018-09-12T13:02:49.043Z","1.0.0-master.20180912161536":"2018-09-12T16:17:46.601Z","1.0.0-master.20180914072630":"2018-09-14T07:29:09.313Z","1.0.0-update-latest.20180914113934":"2018-09-14T12:39:05.867Z","1.0.0-master.20180914124214":"2018-09-14T12:44:44.151Z","1.0.0-logging.20180914164257":"2018-09-14T16:45:15.727Z","1.0.0-master.20180914164924":"2018-09-14T16:52:16.973Z","1.0.0-master.20180914170214":"2018-09-14T17:04:52.701Z","1.0.0-master.20180914173910":"2018-09-14T17:41:20.054Z","1.0.0-master.20180914173832":"2018-09-14T17:42:06.433Z","1.0.0-atomist-update-branch-master-1536998477018.20180915080123":"2018-09-15T08:03:54.812Z","1.0.0-master.20180915080512":"2018-09-15T08:07:40.105Z","1.0.0-master.20180915155756":"2018-09-15T16:00:07.572Z","1.0.0-atomist-update-1.0.0-M.4-1537123170688.20180916183939":"2018-09-16T18:42:19.982Z","1.0.0-master.20180916184335":"2018-09-16T18:46:08.263Z","1.0.0-atomist-update-1.0.0-1537123544823.20180916184551":"2018-09-16T18:48:22.397Z","1.0.0-master.20180916184937":"2018-09-16T18:52:06.723Z","1.0.0-M.4":"2018-09-16T18:57:03.784Z","1.0.0-win32-hooks-194.20180917215626":"2018-09-17T21:58:47.811Z","1.0.0-win32-hooks-194.20180918140319":"2018-09-18T14:05:50.516Z","1.0.0-master.20180918140708":"2018-09-18T14:10:28.072Z","1.0.0-win32-atomist-dir-195.20180918161741":"2018-09-18T16:20:15.693Z","1.0.0-master.20180919150518":"2018-09-19T15:08:05.121Z","1.0.0-win32-atomist-dir-195.20180919152223":"2018-09-19T15:24:53.263Z","1.0.0-win32-atomist-dir-195.20180919152652":"2018-09-19T15:29:32.320Z","1.0.0-win32-atomist-dir-195.20180919153654":"2018-09-19T15:39:27.318Z","1.0.0-master.20180920113246":"2018-09-20T11:35:57.541Z","1.0.0-atomist-update-branch-master-1537450620011.20180920133708":"2018-09-20T13:39:58.029Z","1.0.0-master.20180920134128":"2018-09-20T13:44:20.085Z","1.0.0-atomist-update-1.0.0-1537450948728.20180920134235":"2018-09-20T13:45:29.458Z","1.0.0-master.20180920134549":"2018-09-20T13:48:49.798Z","1.0.0-master.20180920142745":"2018-09-20T14:30:44.705Z","1.0.0-master.20180921185521":"2018-09-21T18:57:58.864Z","1.0.0-master.20180921201329":"2018-09-21T20:15:47.174Z","1.0.0-nortissej.encode-action.20180923025620":"2018-09-23T02:58:54.793Z","1.0.0-master.20180923102924":"2018-09-23T10:32:14.730Z","1.0.0-master.20180923142034":"2018-09-23T14:22:33.820Z","1.0.0-master.20180926201648":"2018-09-26T20:19:30.474Z","1.0.0-atomist-update-1.0.0-M.5-1537994513793.20180926204201":"2018-09-26T20:44:38.986Z","1.0.0-master.20180926204600":"2018-09-26T20:48:37.915Z","1.0.0-M.5":"2018-09-26T20:51:27.805Z","1.0.0-master.20181002082047":"2018-10-02T08:23:14.619Z","1.0.0-nortissej.atomist-project.20181003233912":"2018-10-03T23:41:21.970Z","1.0.0-nortissej.atomist-project.20181004093021":"2018-10-04T09:32:46.456Z","1.0.0-master.20181004094259":"2018-10-04T09:45:11.496Z","1.0.0-master.20181004110322":"2018-10-04T11:05:27.060Z","1.0.0-master.20181004162740":"2018-10-04T16:30:16.764Z","1.0.0-master.20181006203556":"2018-10-06T20:38:04.875Z","1.0.0-master.20181009145826":"2018-10-09T15:00:44.669Z","1.0.0-master.20181010083836":"2018-10-10T08:41:05.010Z","1.0.0-post-commit-stdin-210.20181010185217":"2018-10-10T18:54:44.780Z","1.0.0-post-commit-stdin-210.20181010215353":"2018-10-10T21:56:29.303Z","1.0.0-master.20181011201306":"2018-10-11T20:15:28.101Z","1.0.0-atomist-update-1.0.0-RC.1-1539609209011.20181015131958":"2018-10-15T13:21:38.904Z","1.0.0-master.20181015132422":"2018-10-15T13:26:29.095Z","1.0.0-master.20181015141737":"2018-10-15T14:19:22.056Z","1.0.0-master.20181015142512":"2018-10-15T14:26:59.026Z","1.0.0-RC.1":"2018-10-15T14:32:17.526Z","1.0.0-master.20181017153031":"2018-10-17T15:32:15.150Z","1.0.0-master.20181017154149":"2018-10-17T15:43:41.155Z","1.0.0-master.20181017154846":"2018-10-17T15:50:47.463Z","1.0.0-github-actions.20181019102304":"2018-10-19T10:24:59.166Z","1.0.0-github-actions.20181019105234":"2018-10-19T10:54:48.759Z","1.0.0-github-actions.20181019143419":"2018-10-19T12:35:33.545Z","1.0.0-github-actions.20181019151152":"2018-10-19T13:13:05.551Z","1.0.0-github-actions.20181019151453":"2018-10-19T13:15:57.879Z","1.0.0-github-actions.20181019131651":"2018-10-19T13:19:08.237Z","1.0.0-github-actions.20181019151802":"2018-10-19T13:19:22.999Z","1.0.0-github-actions.20181019142641":"2018-10-19T14:29:28.724Z","1.0.0-github-actions.20181019155042":"2018-10-19T15:52:38.301Z","1.0.0-github-actions.20181019162334":"2018-10-19T16:25:29.988Z","1.0.0-github-actions.20181019164749":"2018-10-19T16:49:46.254Z","1.0.0-github-actions.20181019223839":"2018-10-19T22:40:29.419Z","1.0.0-github-actions.20181019225045":"2018-10-19T22:52:35.210Z","1.0.0-github-actions.20181019230714":"2018-10-19T23:09:26.012Z","1.0.0-github-actions.20181019232817":"2018-10-19T23:30:09.615Z","1.0.0-github-actions.20181020000526":"2018-10-20T00:07:17.187Z","1.0.0-github-actions.20181020001652":"2018-10-20T00:19:05.323Z","1.0.0-github-actions.20181025205820":"2018-10-25T21:00:14.036Z","1.0.0-master.20181026092118":"2018-10-26T09:23:08.915Z","1.0.0-master.20181026112632":"2018-10-26T11:28:37.433Z","1.0.0-github-actions.20181026130545":"2018-10-26T13:08:25.963Z","1.0.0-github-actions.20181026224605":"2018-10-26T22:47:45.561Z","1.0.0-github-actions.20181026233403":"2018-10-26T23:35:43.975Z","1.0.0-atomist-update-1.0.0-RC.2-1540911682164.20181030150239":"2018-10-30T15:04:21.091Z","1.0.0-master.20181030150637":"2018-10-30T15:08:22.603Z","1.0.0-RC.2":"2018-10-30T17:00:39.888Z","1.0.0-master.20181101103545":"2018-11-01T10:37:28.518Z","1.0.0-master.20181109131933":"2018-11-09T13:21:17.819Z","1.0.0":"2018-11-09T13:28:24.054Z","1.0.1-master.20181109133307":"2018-11-09T13:34:41.837Z","1.0.1-master.20181109133714":"2018-11-09T13:38:47.978Z","1.0.1":"2018-11-09T13:40:05.691Z","1.0.2-master.20181109142540":"2018-11-09T14:27:28.845Z","1.0.2":"2018-11-09T14:28:28.901Z","1.0.3-issue-215.20181113092657":"2018-11-13T09:28:39.119Z","1.0.3-issue-215.20181113093717":"2018-11-13T09:39:30.234Z","1.0.3-issue-215.20181113124134":"2018-11-13T12:43:40.599Z","1.0.3-master.20181113124456":"2018-11-13T12:46:37.805Z","1.0.3-atomist-update-latest-1543307347107.20181127083112":"2018-11-27T08:37:01.543Z","1.0.3-master.20181127084442":"2018-11-27T08:47:15.619Z","1.0.3-poll.20181203012517":"2018-12-03T01:26:44.255Z","1.0.3-poll.20181203025207":"2018-12-03T02:53:26.178Z","1.0.3-poll.20181203041143":"2018-12-03T04:13:04.048Z","1.0.3-master.20181204014008":"2018-12-04T01:41:27.502Z","1.0.3-poll.20181204041549":"2018-12-04T04:17:07.371Z","1.0.3-poll.20181204043107":"2018-12-04T04:32:20.793Z","1.0.3-poll.20181205022533":"2018-12-05T02:26:59.411Z","1.0.3-master.20181208213559":"2018-12-08T21:37:21.675Z","1.0.3-master.20181208215507":"2018-12-08T21:56:57.547Z","1.0.3-master.20181208215547":"2018-12-08T21:57:35.969Z","1.0.3-master.20181208223747":"2018-12-08T22:39:12.033Z","1.0.3":"2018-12-08T22:40:29.534Z","1.0.4-master.20181211132012":"2018-12-11T13:21:47.700Z","1.0.4-fix-k8-descriptor-transform.20181221142658":"2018-12-21T14:28:16.689Z","1.0.4-master.20181227082018":"2018-12-27T08:21:43.115Z","1.0.4-master.20181227120723":"2018-12-27T12:08:44.438Z","1.0.4-master.20181227215519":"2018-12-27T21:56:42.964Z","1.0.4-master.20181227222825":"2018-12-27T22:29:48.157Z","1.0.4":"2018-12-27T22:32:19.454Z","1.0.5-master.20190106134154":"2019-01-06T13:43:15.669Z","1.0.5-pref-store.20190115124000":"2019-01-15T12:41:38.807Z","1.0.5-master.20190115145224":"2019-01-15T14:54:07.895Z","1.0.5-master.20190115145628":"2019-01-15T14:58:22.607Z","1.0.5-nortissej.log-ports.20190117204627":"2019-01-17T20:48:26.738Z","1.0.5-master.20190121144327":"2019-01-21T14:46:18.828Z","1.0.5-master.20190125191628":"2019-01-25T19:18:14.324Z","1.0.5-nortissej.print-fields.20190130193510":"2019-01-30T19:36:48.143Z","1.0.5-master.20190201192832":"2019-02-01T19:30:14.032Z","1.0.5-nortissej.ignoreFingerprints.20190225221904":"2019-02-25T22:20:56.069Z","1.0.5-nortissej.ignoreFingerprints.20190225225639":"2019-02-25T22:58:37.653Z","1.0.5-master.20190228205547":"2019-02-28T20:58:07.898Z","1.0.5-nortissej.extensionPackGen.20190228211557":"2019-02-28T21:18:08.904Z","1.0.5-nortissej.extensionPackGen.20190228213927":"2019-02-28T21:41:31.674Z","1.0.5-nortissej.extensionPackGen.20190228214911":"2019-02-28T21:51:19.999Z","1.0.5-nortissej.extensionPackGen.20190228220243":"2019-02-28T22:05:23.787Z","1.0.5-nortissej.ignoreFingerprints.20190228235405":"2019-02-28T23:56:21.646Z","1.0.5-master.20190301000954":"2019-03-01T00:12:19.406Z","1.0.5-master.20190312090158":"2019-03-12T09:05:24.256Z","1.0.5-master.20190312090614":"2019-03-12T09:10:17.599Z","1.0.5-master.20190314235921":"2019-03-15T00:01:36.665Z","1.0.5-master.20190315000709":"2019-03-15T00:10:21.933Z","1.0.5":"2019-03-15T00:23:49.813Z","1.0.6-nortissej.explain-target-owner.20190325195130":"2019-03-25T19:53:20.796Z","1.0.6-nortissej.instructions-after-create-sdm.20190325210513":"2019-03-25T21:08:03.535Z","1.0.6-master.20190326042901":"2019-03-26T04:31:01.893Z","1.0.6-master.20190327194706":"2019-03-27T19:51:04.887Z","1.0.6-suppress-feed-suggestion.20190408021352":"2019-04-08T02:15:04.781Z","1.0.6-suggest-feed-less.20190408024618":"2019-04-08T02:47:41.210Z","1.0.6-master.20190408062103":"2019-04-08T06:22:30.873Z","1.0.6-nortissej.remove-channel-message.20190412235021":"2019-04-12T23:51:45.115Z","1.0.6-local-remote-repo-ref-252.20190415205529":"2019-04-15T20:57:11.389Z","1.0.6-local-remote-repo-ref-252.20190415210108":"2019-04-15T21:02:38.068Z","1.0.6-master.20190416120446":"2019-04-16T12:06:32.587Z","1.0.6-master.20190416120625":"2019-04-16T12:07:55.277Z","1.0.6":"2019-04-16T12:22:17.302Z","1.0.7-master.20190417085029":"2019-04-17T08:52:28.031Z","1.0.7-master.20190417085112":"2019-04-17T08:52:39.102Z","1.0.7-nortissej.types-open.20190417162510":"2019-04-17T16:27:05.361Z","1.0.7-master.20190417180748":"2019-04-17T18:09:46.940Z","1.0.7-master.20190417181005":"2019-04-17T18:11:38.294Z","1.0.7-nortissej.excess-slash.20190419192635":"2019-04-19T19:28:06.127Z","1.0.7-master.20190419195742":"2019-04-19T19:59:18.553Z","1.0.7-nortissej.lint-fixes.20190419225829":"2019-04-19T22:59:58.696Z","1.0.7-nortissej.lint-fixes.20190419231753":"2019-04-19T23:19:22.304Z","1.0.7-nortissej.lint-fixes.20190419231918":"2019-04-19T23:21:31.007Z","1.0.7-nortissej.lint-fixes.20190419232132":"2019-04-19T23:23:35.300Z","1.0.7-master.20190429204230":"2019-04-29T20:44:12.341Z","1.0.7-nortissej.lint-fixes.20190507173849":"2019-05-07T17:40:39.962Z","1.0.7-master.20190507205218":"2019-05-07T20:54:24.595Z","1.0.7-master.20190527202455":"2019-05-27T20:28:12.223Z","1.0.7-master.20190527212538":"2019-05-27T21:28:34.924Z","1.0.7":"2019-05-27T21:29:56.020Z","1.0.8-atomist-update-latest-20190530225143.20190531070351":"2019-05-31T07:06:49.831Z","1.0.8-master.20190531071033":"2019-05-31T07:12:54.024Z","1.0.8-master.20190531071255":"2019-05-31T07:14:44.120Z","1.0.8-master.20190531150923":"2019-05-31T15:11:54.549Z","1.0.8":"2019-05-31T16:55:43.189Z","1.0.9-master.20190604162557":"2019-06-04T16:27:36.137Z","1.0.9-master.20190709113115":"2019-07-09T11:32:45.706Z","1.0.9":"2019-07-09T11:43:49.525Z","1.0.10-master.20190711103432":"2019-07-11T10:38:07.985Z","1.0.10-master.20190711103748":"2019-07-11T10:42:41.916Z","1.0.10-master.20190711104206":"2019-07-11T10:44:06.701Z","1.0.10":"2019-07-11T10:46:43.140Z","1.0.11-master.20190802160233":"2019-08-02T16:05:01.935Z","1.0.11-apply-target-fingerprint-20190802160206.20190802160407":"2019-08-02T16:08:36.891Z","1.1.0-master.20190802161533":"2019-08-02T16:18:18.247Z","1.1.0-master.20190802161458":"2019-08-02T16:18:52.026Z","1.1.0-master.20190802170815":"2019-08-02T17:11:59.124Z","1.1.0-master.20190802172217":"2019-08-02T17:25:25.569Z","1.1.0":"2019-08-02T17:28:09.314Z","1.1.1-nortissej.just-a-comment.20190821233539":"2019-08-21T23:38:10.487Z","1.1.1-master.20190821234932":"2019-08-21T23:52:07.954Z","1.1.1-nortissej.debugDocNotFound.20190827214849":"2019-08-27T21:51:31.207Z","1.1.1-nortissej.debugDocNotFound.20190827221715":"2019-08-27T22:20:43.155Z","1.1.1-master.20190827222150":"2019-08-27T22:26:49.586Z","1.1.1-cli-deprecate-remote-108.20190830181314":"2019-08-30T18:16:27.267Z","1.1.1-cli-deprecate-remote-108.20190830185618":"2019-08-30T18:59:19.683Z","1.1.1-master.20190830194854":"2019-08-30T19:52:15.843Z","1.2.0-master.20190830201514":"2019-08-30T20:18:36.952Z","1.2.0":"2019-08-30T20:26:16.580Z","1.2.1-master.20190904123415":"2019-09-04T12:38:08.618Z","1.2.1-master.20190905171149":"2019-09-05T17:16:05.480Z","1.2.1-master.20190905210152":"2019-09-05T21:05:44.509Z","1.2.1-master.20190909182725":"2019-09-09T18:32:43.598Z","1.2.1-master.20190909183016":"2019-09-09T18:34:44.780Z","1.2.1":"2019-09-09T19:16:23.406Z","1.2.2-atomist.a260p86nh.typescript-version.master.20190915202714":"2019-09-15T20:30:39.308Z","1.2.2-master.20190915225612":"2019-09-15T22:59:12.899Z","1.2.2-master.20191011215150":"2019-10-11T21:53:42.316Z","1.2.2-master.20191206162119":"2019-12-06T16:22:57.392Z"},"maintainers":[{"email":"neil.prosser+npmjs@gmail.com","name":"neilprosser"},{"email":"npm@atomist.com","name":"atomist-bot"},{"email":"cd@atomist.com","name":"cdupuis"},{"email":"slimslenderslacks@gmail.com","name":"slimslenderslacks"}],"description":"Atomist Software Delivery Machine - Local","homepage":"https://github.com/atomist/sdm-local#readme","keywords":["atomist","automation","sdm","local","ci","cd"],"repository":{"type":"git","url":"git+https://github.com/atomist/sdm-local.git"},"author":{"name":"Atomist","email":"support@atomist.com","url":"https://atomist.com/"},"bugs":{"url":"https://github.com/atomist/sdm-local/issues"},"license":"Apache-2.0","readme":"","readmeFilename":""}